How to make an external HTML file content not be appeared in the home paged?
Sorry for the confusing title, I really don't know how to title my question,
I am trying to make a dropdown shopping cart, I have designed the cart
using html css php and jquery. the file name cart.php
<div class="maincontainer">
....
....
</div>
There is a shopping cart button in the home page "index.php", to make the
cart.php be appeared as a dropdown in the index.php
I have include the car.php as include "cart.php"
First problem: all the cart.php content are being shown on the top of the
index.php even if I set the maincontainer display to none
2nd problem, I cant figure out how to call the cart in a div on index.php ?
3rd, What topic or keyword should i search, to learn how to solve the
above issues?
I am learning all my own :)
Sorry if the question is too simple.
Monday, 9 September 2013
Authorization c# mvc
Authorization c# mvc
I want to create c# mvc internet application that allows users to edit
their own accounts. I want to have fields such as first name, surname,
date of birth and location.
I'm aware of the built in authorization and the Authorize attribute for
the controllers. I do currently have the default AccountController in the
project.
I'm just not sure what the best way is to extend on the default username
and password properties for each user? Should I store the membership id in
a new class containing the other properties or is there a better way?
I want to create c# mvc internet application that allows users to edit
their own accounts. I want to have fields such as first name, surname,
date of birth and location.
I'm aware of the built in authorization and the Authorize attribute for
the controllers. I do currently have the default AccountController in the
project.
I'm just not sure what the best way is to extend on the default username
and password properties for each user? Should I store the membership id in
a new class containing the other properties or is there a better way?
Regex to remove and preserve lines
Regex to remove and preserve lines
pI'm looking to use the following regex line to remove malicious code from
my site;/p pcodefind -type f -name \*.php -exec sed -i
's/.*eval(base64_decode(\CmVycm.*/lt;?php/g' {} \;/code/p pThis will
preserve codelt;?php/code which I want but I noticed that many of the
injections are throughout php files on multiple lines, meaning not just
the very first codelt;?php/code So is it possible to do an if do otherwise
statement where if its on line 1 of a php file preserve the php tag
otherwise remove the entire line if its anywhere else?/p
pI'm looking to use the following regex line to remove malicious code from
my site;/p pcodefind -type f -name \*.php -exec sed -i
's/.*eval(base64_decode(\CmVycm.*/lt;?php/g' {} \;/code/p pThis will
preserve codelt;?php/code which I want but I noticed that many of the
injections are throughout php files on multiple lines, meaning not just
the very first codelt;?php/code So is it possible to do an if do otherwise
statement where if its on line 1 of a php file preserve the php tag
otherwise remove the entire line if its anywhere else?/p
Sunday, 8 September 2013
Issue with List picker FullModeItemTemplate template
Issue with List picker FullModeItemTemplate template
I am using the Listpicker control in my WP8 app, where
FullModeItemTemplate is defined to display a custom list of options and I
enabled SelectionMode to Multiple, so that user can select multiple
options from the Listpicker. On code behind, i am binding the text.
My main question, with below my xaml output of the fullmode has lot of
free space between each list item. I couldn't able to figure out how to
minimize the gap between...
<toolkit:ListPicker x:Name="userCountryList" ItemsSource="{Binding
CountryList}" Header="Choose a country or region:"
SelectionMode="Multiple" FullModeItemTemplate="{StaticResource
DataTemplate2}" />
<phone:PhoneApplicationPage.Resources>
<DataTemplate x:Key="DataTemplate2">
<StackPanel Orientation="Horizontal">
<TextBlock HorizontalAlignment="Left" FontSize="28"
TextWrapping="Wrap" Text="{Binding CountryName}"
VerticalAlignment="Center" Width="Auto"/>
</StackPanel>
</DataTemplate>
</phone:PhoneApplicationPage.Resources>
Current fullmode output is like below:
I am using the Listpicker control in my WP8 app, where
FullModeItemTemplate is defined to display a custom list of options and I
enabled SelectionMode to Multiple, so that user can select multiple
options from the Listpicker. On code behind, i am binding the text.
My main question, with below my xaml output of the fullmode has lot of
free space between each list item. I couldn't able to figure out how to
minimize the gap between...
<toolkit:ListPicker x:Name="userCountryList" ItemsSource="{Binding
CountryList}" Header="Choose a country or region:"
SelectionMode="Multiple" FullModeItemTemplate="{StaticResource
DataTemplate2}" />
<phone:PhoneApplicationPage.Resources>
<DataTemplate x:Key="DataTemplate2">
<StackPanel Orientation="Horizontal">
<TextBlock HorizontalAlignment="Left" FontSize="28"
TextWrapping="Wrap" Text="{Binding CountryName}"
VerticalAlignment="Center" Width="Auto"/>
</StackPanel>
</DataTemplate>
</phone:PhoneApplicationPage.Resources>
Current fullmode output is like below:
Creating hashes from parsed HTML
Creating hashes from parsed HTML
I'm getting second table from this page, parse it and trying to generate
hashes from this data. The problem is that each object is separated by
this grey TR but I can only manage this by getting every single TR from
this table.
How can I determine proper TR by getting those between gray ones?
For now I'm using this line to get each TR:
parsed_html.css("table")[1].css("tr")
I'm getting second table from this page, parse it and trying to generate
hashes from this data. The problem is that each object is separated by
this grey TR but I can only manage this by getting every single TR from
this table.
How can I determine proper TR by getting those between gray ones?
For now I'm using this line to get each TR:
parsed_html.css("table")[1].css("tr")
Sub domain in rails app?
Sub domain in rails app?
I've built a rails app that running on one domain. I would like to add a
separate site within the app for charges through stripe.
If I create a new controller, how do I point it to a sub domain of that
same domain?
How do I get it to work with Heroku?
I've built a rails app that running on one domain. I would like to add a
separate site within the app for charges through stripe.
If I create a new controller, how do I point it to a sub domain of that
same domain?
How do I get it to work with Heroku?
Error when linking with POCO library compiled with i686-w64-mingw32
Error when linking with POCO library compiled with i686-w64-mingw32
I am using i686-w64-mingw32 downloaded from sf to compile POCO libraries.
Libraries are compiled and libPoco*.a files are created (with some
warnings). Now when I want to use those files (e.g. in a small sample
project which converts string to integer), linker throws error saying:
./Debug/main.o:main.cpp:(.text+0xab): undefined reference to
`imp__ZN4Poco12NumberParser5parseERKSs'
The strange thing is that if I do compilation for both sides (lib and test
app) using TDM-MinGW-4.7.1 everything is fine!
I tried setting "-march=i386;-m32" on both compilations but no luck. Here
is log of linker when I try to build my test app:
g++ -o ./Debug/testpoco @"testpoco.txt" -L. -Lc:/poco/lib/
-lPocoFoundationmtd -v
Using built-in specs.
COLLECT_GCC=g++
...
Target: i686-w64-mingw32
...
Thread model: win32
gcc version 4.8.1 (rev5, Built by MinGW-W64 project)
...
COLLECT_GCC_OPTIONS='-o' './Debug/testpoco.exe' '-L.' '-Lc:/poco/lib/'
'-v' '-shared-libgcc' '-mtune=generic' '-march=i686'
...
./Debug/main.o:main.cpp:(.text+0xab): undefined reference to
`_imp___ZN4Poco12NumberParser5parseERKSs'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[1]: *** [Debug/testpoco] Error 1
testpoco.mk:77: recipe for target 'Debug/testpoco' failed
I am using i686-w64-mingw32 downloaded from sf to compile POCO libraries.
Libraries are compiled and libPoco*.a files are created (with some
warnings). Now when I want to use those files (e.g. in a small sample
project which converts string to integer), linker throws error saying:
./Debug/main.o:main.cpp:(.text+0xab): undefined reference to
`imp__ZN4Poco12NumberParser5parseERKSs'
The strange thing is that if I do compilation for both sides (lib and test
app) using TDM-MinGW-4.7.1 everything is fine!
I tried setting "-march=i386;-m32" on both compilations but no luck. Here
is log of linker when I try to build my test app:
g++ -o ./Debug/testpoco @"testpoco.txt" -L. -Lc:/poco/lib/
-lPocoFoundationmtd -v
Using built-in specs.
COLLECT_GCC=g++
...
Target: i686-w64-mingw32
...
Thread model: win32
gcc version 4.8.1 (rev5, Built by MinGW-W64 project)
...
COLLECT_GCC_OPTIONS='-o' './Debug/testpoco.exe' '-L.' '-Lc:/poco/lib/'
'-v' '-shared-libgcc' '-mtune=generic' '-march=i686'
...
./Debug/main.o:main.cpp:(.text+0xab): undefined reference to
`_imp___ZN4Poco12NumberParser5parseERKSs'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[1]: *** [Debug/testpoco] Error 1
testpoco.mk:77: recipe for target 'Debug/testpoco' failed
Subscribe to:
Posts (Atom)