Skip to content

Instantly share code, notes, and snippets.


Vivek Maskara maskaravivek

View GitHub Profile
maskaravivek / Bollywood Jalwa song Scrapper
Created Mar 23, 2014
Code to scrap songs from bollywood jalwa and save it in a MYSQL database.
View Bollywood Jalwa song Scrapper
$album="Single Track";
$letters=range('A', 'Z');
$htm= file_get_html($ur);
maskaravivek / Extract quotes from goodreads
Created Mar 28, 2014
This php code uses simple_html_dom to scrap quotes along with their authors from Goodreads to a MYSQL database.
View Extract quotes from goodreads
if(!empty($_POST['name']) && !empty($_POST['number']))
maskaravivek / Custom textbox style resource in windows phone
Created Mar 29, 2014
XAML code to edit textbox style in windows phone app
View Custom textbox style resource in windows phone
<local:BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter" />
<Style x:Key="HeaderedContentControlHeaderStyle" TargetType="ContentControl">
<Setter Property="Foreground" Value="{StaticResource PhoneSubtleBrush}"/>
<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeNormal}"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Style x:Key="TextBoxHeaderStyle" BasedOn="{StaticResource HeaderedContentControlHeaderStyle}" TargetType="ContentControl">
<Setter Property="Padding" Value="0,0,0,8"/>
maskaravivek / Copy reference database to isolated storage
Created Apr 1, 2014
This method simply moves the referenced database from the windows phone's project folder to the application's isolated storage
View Copy reference database to isolated storage
public static void MoveReferenceDatabase()
// Obtain the virtual store for the application.
IsolatedStorageFile iso = IsolatedStorageFile.GetUserStoreForApplication();
// Create a stream for the file in the installation folder.
using (Stream input = Application.GetResourceStream(new Uri("DutchMe.sdf", UriKind.Relative)).Stream)
// Create a stream for the new file in the local folder.
using (IsolatedStorageFileStream output = iso.CreateFile("DutchMe.sdf"))
maskaravivek / Excel Uploader usage
Last active Aug 29, 2015
Excel Uploader usage
View Excel Uploader usage
include 'simplexlsx.class.php';
include 'config.php';
$xlsx = new SimpleXLSX('ringtones.xlsx');
$excel = array(array());
$excel = $xlsx->rows();
$name = $excel[$i][0];
View simplexlsx.class.php
SimpleXLSX php class v0.6.8
MS Excel 2007 workbooks reader
Example 1:
$xlsx = new SimpleXLSX('book.xlsx');
print_r( $xlsx->rows() );
Example 2:
maskaravivek / App.xaml
Last active Aug 29, 2015
Function to validate email address
View App.xaml
<Style x:Key="TokkriHeaderStyle" TargetType="ContentControl">
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Foreground" Value="{StaticResource TokkriTheme}"/>
<Setter Property="Margin" Value="0,4,0,4"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Style x:Key="TokkriTextBox" TargetType="telerikPrimitives:RadTextBox">
<Setter Property="HeaderStyle" Value="{StaticResource TokkriHeaderStyle}"/>
<Setter Property="Height" Value="108"/>
View error.php
//rest of php code
maskaravivek / location.cs
Created Apr 17, 2014
How to check whether location is enabled on windows phone device?
View location.cs
public void locationfinder()
Deployment.Current.Dispatcher.BeginInvoke(() =>
GeoCoordinateWatcher g = new GeoCoordinateWatcher(GeoPositionAccuracy.High);
if (g.Permission == GeoPositionPermission.Denied)
App.phonelocationenabled = false;
// then we know it is off, else we assume it is on
maskaravivek / custom_message_box.cs
Created Apr 17, 2014
Using custom message box in windows phone app
View custom_message_box.cs
CustomMessageBox msg=new CustomMessageBox()
Caption="Location Settings",
Message="Location seems to be disabled on your device. Do your want to change your settings?",
msg.Dismissed += (s1, e1) =>
switch (e1.Result)
You can’t perform that action at this time.