CakePHP belongsTo not working
I have a couple of tables in my database:
CREATE TABLE IF NOT EXISTS `team_players` (
`artificialid` int(11) NOT NULL AUTO_INCREMENT,
`team_name_id` int(11) NOT NULL,
`player_id` int(11) NOT NULL,
PRIMARY KEY (`artificialid`)
)
And:
CREATE TABLE IF NOT EXISTS `team_names` (
`id` int(11) NOT NULL,
`name` varchar(50) NOT NULL
)
And I have set up my TeamPlayer model like this:
class TeamPlayerModel extends AppModel {
public $belongsTo = array(
'TeamName',
'Player'
)
);
}
The players table has a field id, but neither of the associations are
working.
I don't really understand why it isn't working, I have something like this
working in another app, pretty much line for line.
Thanks in advance, I really appreciate any help.
Thursday, 3 October 2013
Wednesday, 2 October 2013
iOS 7 - XCode 5 - Constraints
iOS 7 - XCode 5 - Constraints
I am trying to learn iOS development, but I need portrait and landscape in
my project. As I set it up, I notice that I am messing everything up. I
may need a bit of help with this.
This is what I need in landscape:
Here it is in landscape:
You see, I've been trying out Auto Layout, but it's been a really bad
experience. How do I make constraints on this?
I need it to fit in Portrait and Landscape, but as soon as I fit it with
either of them, it messes up the other view.
Do you guys have any ideas?
I am trying to learn iOS development, but I need portrait and landscape in
my project. As I set it up, I notice that I am messing everything up. I
may need a bit of help with this.
This is what I need in landscape:
Here it is in landscape:
You see, I've been trying out Auto Layout, but it's been a really bad
experience. How do I make constraints on this?
I need it to fit in Portrait and Landscape, but as soon as I fit it with
either of them, it messes up the other view.
Do you guys have any ideas?
Best way to handle internet authentication pages within iOS app?
Best way to handle internet authentication pages within iOS app?
What is the best way to handle WIFI authentication pages within an iOS app
(often found in free WIFI zones, hotels, etc.) such as within Settings.app
(displays a web view within a modal when user needs to be authenticated)?
I have some ideas for a custom solution such as checking for redirects,
content types, and then displaying a web view to the user, but wondering
if there is an already implemented pre-existing solution.
Background:
iOS 5+ supported
All network requests routed through AFNetworking
What is the best way to handle WIFI authentication pages within an iOS app
(often found in free WIFI zones, hotels, etc.) such as within Settings.app
(displays a web view within a modal when user needs to be authenticated)?
I have some ideas for a custom solution such as checking for redirects,
content types, and then displaying a web view to the user, but wondering
if there is an already implemented pre-existing solution.
Background:
iOS 5+ supported
All network requests routed through AFNetworking
Can't get ANSI C code to compile with gcc
Can't get ANSI C code to compile with gcc
I got the following code from "The C Programming Language" written by
Brian Kernighan and Dennis Ritchie. However, it won't compile with gcc:
#include <stdio.h>
#include <string.h>
#define MAXLINE 1000
int getline(char *line, int max);
{
char line[MAXLINE];
int found = 0;
if (argc != 2)
printf("Usage: find pattern\n");
else
while (getline(line, MAXLINE) > 0)
if (strstr(line, argv[1]) != NULL) {
printf("%s", line);
found++;
}
return found;
}
All I get is: error: expected identifier or '(' before '{'.
What am I doing wrong?
I got the following code from "The C Programming Language" written by
Brian Kernighan and Dennis Ritchie. However, it won't compile with gcc:
#include <stdio.h>
#include <string.h>
#define MAXLINE 1000
int getline(char *line, int max);
{
char line[MAXLINE];
int found = 0;
if (argc != 2)
printf("Usage: find pattern\n");
else
while (getline(line, MAXLINE) > 0)
if (strstr(line, argv[1]) != NULL) {
printf("%s", line);
found++;
}
return found;
}
All I get is: error: expected identifier or '(' before '{'.
What am I doing wrong?
Finding any text in a column, then searching above/beneath it then adding a result in another cell
Finding any text in a column, then searching above/beneath it then adding
a result in another cell
Ive had help with this code yesterday and have added another part to it.
Here is the code
Sub findtext()
Dim findtext As Range
For Each findtext In Range(ActiveSheet.Range("C3"),
ActiveSheet.Range("C250").End(xlUp)).Cells
If Len(findtext) > 0 Then findtext.Offset(0, 1) = findtext.Offset(-2, 7)
If Len(findtext) > 0 Then findtext.Offset(0, 2) = findtext.Offset(0,
1) + findtext.Offset(0, 0)
Next findtext
End Sub
This is working great.
My data is in lots of 2 (ie C10 has some data, then so does C11, then
nothing till C25 / C26 etc. I want to put the A in E10 and B in E11 - Then
A in E25 and B in E26
I think I need to find the text in Col C then see if there is text above
it, if there is then that would put the B in E11/E26 etc, and if cell
above text is empty but there is text in the cell below then we add the A
Hope this makes sense otherwise ill try explaining again
Thanks!
Something like this, but this is doing that on every check, so its not
working obvoiusly
If Len(findtext) > 0 Then findtext.Offset(0, 2) = "A"
If Len(findtext) > 0 Then findtext.Offset(1, 2) = "B"
Here is a link for my file:
http://www.megafileupload.com/en/file/456565/example1-xlsm.html
I have also included more notes inside the macro of what I need done
a result in another cell
Ive had help with this code yesterday and have added another part to it.
Here is the code
Sub findtext()
Dim findtext As Range
For Each findtext In Range(ActiveSheet.Range("C3"),
ActiveSheet.Range("C250").End(xlUp)).Cells
If Len(findtext) > 0 Then findtext.Offset(0, 1) = findtext.Offset(-2, 7)
If Len(findtext) > 0 Then findtext.Offset(0, 2) = findtext.Offset(0,
1) + findtext.Offset(0, 0)
Next findtext
End Sub
This is working great.
My data is in lots of 2 (ie C10 has some data, then so does C11, then
nothing till C25 / C26 etc. I want to put the A in E10 and B in E11 - Then
A in E25 and B in E26
I think I need to find the text in Col C then see if there is text above
it, if there is then that would put the B in E11/E26 etc, and if cell
above text is empty but there is text in the cell below then we add the A
Hope this makes sense otherwise ill try explaining again
Thanks!
Something like this, but this is doing that on every check, so its not
working obvoiusly
If Len(findtext) > 0 Then findtext.Offset(0, 2) = "A"
If Len(findtext) > 0 Then findtext.Offset(1, 2) = "B"
Here is a link for my file:
http://www.megafileupload.com/en/file/456565/example1-xlsm.html
I have also included more notes inside the macro of what I need done
Tuesday, 1 October 2013
Fiddle doesn't work Javascript
Fiddle doesn't work Javascript
http://jsfiddle.net/9zvt6/
var SList = $('.table>div.conChip').sort(function(a,b){
return a.dataset.sid > b.dataset.sid
});
var i = 0;
while(SList.length>i)
{
alert(SList[i].dataset.sid);
i++;
}
If I remove the inner divs the styles and classes everything seems to
work, otherwise it doesn't, what am I missing?
http://jsfiddle.net/9zvt6/
var SList = $('.table>div.conChip').sort(function(a,b){
return a.dataset.sid > b.dataset.sid
});
var i = 0;
while(SList.length>i)
{
alert(SList[i].dataset.sid);
i++;
}
If I remove the inner divs the styles and classes everything seems to
work, otherwise it doesn't, what am I missing?
Fragment activity gets destroyed when entering new activity from fragment and going back
Fragment activity gets destroyed when entering new activity from fragment
and going back
I have an activity of type FragmentActivity. Inside I have some content
using view pager, where each scrollable tab is a fragment:
<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".OpenStack" >
<!--
This title strip will display the currently visible page title, as
well as the page
titles for adjacent pages.
-->
<android.support.v4.view.PagerTitleStrip
android:id="@+id/pager_title_strip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:background="#33b5e5"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:textColor="#fff" />
</android.support.v4.view.ViewPager>
Inside the fragment I'm opening a new activity when user taps on the item
in the list like this:
Intent myIntent = new Intent(getActivity(), InstanceActivity.class);
getActivity().startActivity(myIntent);
But when i click back in the InstaceActivity to return to the one with
fragments it is destroyed and created again. I have to no idea why that
happens. Should I do something special to keep the FragmentActivity in the
backstack?
It doesn't even help to save the state with:
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putString("CONNTOKEN", isConnToken);
outState.putString("NOVAURL", isNovaURL);
}
Because in the oncreate event of the FragmentActivity the
savedInstanceState is NULL when I press back ??
and going back
I have an activity of type FragmentActivity. Inside I have some content
using view pager, where each scrollable tab is a fragment:
<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".OpenStack" >
<!--
This title strip will display the currently visible page title, as
well as the page
titles for adjacent pages.
-->
<android.support.v4.view.PagerTitleStrip
android:id="@+id/pager_title_strip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:background="#33b5e5"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:textColor="#fff" />
</android.support.v4.view.ViewPager>
Inside the fragment I'm opening a new activity when user taps on the item
in the list like this:
Intent myIntent = new Intent(getActivity(), InstanceActivity.class);
getActivity().startActivity(myIntent);
But when i click back in the InstaceActivity to return to the one with
fragments it is destroyed and created again. I have to no idea why that
happens. Should I do something special to keep the FragmentActivity in the
backstack?
It doesn't even help to save the state with:
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putString("CONNTOKEN", isConnToken);
outState.putString("NOVAURL", isNovaURL);
}
Because in the oncreate event of the FragmentActivity the
savedInstanceState is NULL when I press back ??
multiple pppoe with proxy server
multiple pppoe with proxy server
Im trying to use a Raspbarry pi to to build a proxy server with multiple
pppoe connections. so, i can let my spider easier to change different ip
through proxy server and using different ip address.
Device are : one pppoe modem, one raspbarry pi, one laptop
And here is what i did :
1. build up two pppoe connections by using Raspbarry pi (different ip but
same gateway)
2. setup load balance to make sure two pppoe connect is functional
command :
ip route replace default scope global nexthop dev ppp0 weight 1
nexthop dev ppp1 weight 1
3. setup 2 ip alias
command :
ip address add 192.168.55.11/24 brd + dev eth0 label eth0:0
ip address add 192.168.55.12/24 brd + dev eth0 label eth0:1
4. setup squid server like this :
acl ip1 myip 192.168.55.11
tcp_outgoing_address xxx.xxx.xxx.xxx (the real ip i get from ppp0) ip1
acl ip2 myip 192.168.55.12
tcp_outgoing_address xxx.xxx.xxx.xxx (the real ip i get from ppp1) ip2
5. use other computer to connect it through lan ip and make proxy change
real ip for me
And the question is i found out that the network package will lost by
random, and squid log will show tcp_miss/200 or tcp_miss/503 errors.
Can anyone please give me a direction on this issues or any suggestion to
make this easier ? Thank you
Im trying to use a Raspbarry pi to to build a proxy server with multiple
pppoe connections. so, i can let my spider easier to change different ip
through proxy server and using different ip address.
Device are : one pppoe modem, one raspbarry pi, one laptop
And here is what i did :
1. build up two pppoe connections by using Raspbarry pi (different ip but
same gateway)
2. setup load balance to make sure two pppoe connect is functional
command :
ip route replace default scope global nexthop dev ppp0 weight 1
nexthop dev ppp1 weight 1
3. setup 2 ip alias
command :
ip address add 192.168.55.11/24 brd + dev eth0 label eth0:0
ip address add 192.168.55.12/24 brd + dev eth0 label eth0:1
4. setup squid server like this :
acl ip1 myip 192.168.55.11
tcp_outgoing_address xxx.xxx.xxx.xxx (the real ip i get from ppp0) ip1
acl ip2 myip 192.168.55.12
tcp_outgoing_address xxx.xxx.xxx.xxx (the real ip i get from ppp1) ip2
5. use other computer to connect it through lan ip and make proxy change
real ip for me
And the question is i found out that the network package will lost by
random, and squid log will show tcp_miss/200 or tcp_miss/503 errors.
Can anyone please give me a direction on this issues or any suggestion to
make this easier ? Thank you
Foreman Unattended Installation
Foreman Unattended Installation
I am currently hard coding a preseed configuration to install foreman on a
new machine together with Ubuntu 12.04. The intention is to be able to
reproducably create a foreman installation which deploys openstack on
brand new machines via PXE.
I think I can achieve this with my manual hacking, but to me it seems to
be overkill. Is there a possibility for foreman to provision itself? Can a
"temporary" foreman create an install image and provision itself?
I am currently hard coding a preseed configuration to install foreman on a
new machine together with Ubuntu 12.04. The intention is to be able to
reproducably create a foreman installation which deploys openstack on
brand new machines via PXE.
I think I can achieve this with my manual hacking, but to me it seems to
be overkill. Is there a possibility for foreman to provision itself? Can a
"temporary" foreman create an install image and provision itself?
Monday, 30 September 2013
Icons on the desktop do not state the name of the file/directory?
Icons on the desktop do not state the name of the file/directory?
How do I fix the desktop icon which don't show the file/directory names
they are associated with and has an icon size which is to small to be on
the desktop?
I scanned through unity-tweak-tool but found no option option relevant to
this.
Ubuntu 13.04 it is.
Screenshot:
How do I fix the desktop icon which don't show the file/directory names
they are associated with and has an icon size which is to small to be on
the desktop?
I scanned through unity-tweak-tool but found no option option relevant to
this.
Ubuntu 13.04 it is.
Screenshot:
Does case carry into an appositive=?iso-8859-1?Q?=3F_=96_german.stackexchange.com?=
Does case carry into an appositive? – german.stackexchange.com
I'll ask this question in English, because I'm not sure I could articulate
it well enough in German. So this question too is about my essay. The
relevant part of the original sentence was «...die …
I'll ask this question in English, because I'm not sure I could articulate
it well enough in German. So this question too is about my essay. The
relevant part of the original sentence was «...die …
Placing numeric value into an Array range
Placing numeric value into an Array range
I have an array that has numeric values stored. like this:
$ranges = array(1=> '33', 2=> '66', 3=> '99');
i have a variable called $result that gives me a dynamic value between 0-100.
for example:
If $result is equal to or greater than 33 AND less than 66, then the
returned key should be 1
If $result is equal to or greater than 66 AND less than 99, then the
returned key should be 2
If $result is equal to or greater than 99, then the returned key should be 3
Any ideas on how this can be achieved?
I have an array that has numeric values stored. like this:
$ranges = array(1=> '33', 2=> '66', 3=> '99');
i have a variable called $result that gives me a dynamic value between 0-100.
for example:
If $result is equal to or greater than 33 AND less than 66, then the
returned key should be 1
If $result is equal to or greater than 66 AND less than 99, then the
returned key should be 2
If $result is equal to or greater than 99, then the returned key should be 3
Any ideas on how this can be achieved?
How to use profilling for Mac OS X Applications?
How to use profilling for Mac OS X Applications?
I am looking forward to do some profiling to find cpu usage of my
application. Also in which part of the code its taking more cpu time. I am
fresh to the profiling. I need help regarding this,
I am looking forward to do some profiling to find cpu usage of my
application. Also in which part of the code its taking more cpu time. I am
fresh to the profiling. I need help regarding this,
Sunday, 29 September 2013
Jquery Form plugin : dynamic target/multiple forms
Jquery Form plugin : dynamic target/multiple forms
I am using the form plugin from http://malsup.com/jquery/form/
I am trying to set the target div to be updated dynamically. At the moment
this is what the code looks like but instead I want to pas a different
value for target through a hidden form field, so the #target2 can be
dynamically changed to #target20, #target40 etc. Thanks.
<script type="text/javascript">
$(document).ready(function() {
$('.htmlForm').ajaxForm({
target: '#target2',
success: function() {
$('#target2').fadeIn('slow');
}
});
});
</script>
and the form html
<form class="htmlForm" action="ajax-data.php" method="post">
<input type="hidden" name="target" value="ztest" />
Message: <input type="text" name="message" value="Hello HTML" />
<input type="submit" value="Echo as HTML" />
</form>
and the div to be updated
<div id="ztest"></div>
another form
<form class="htmlForm" action="ajax-data.php" method="post">
<input type="hidden" name="target" value="ztest2" />
Message: <input type="text" name="message" value="Hello HTML" />
<input type="submit" value="Echo as HTML" />
</form>
and another div to be updated
<div id="ztest2"></div>
I am using the form plugin from http://malsup.com/jquery/form/
I am trying to set the target div to be updated dynamically. At the moment
this is what the code looks like but instead I want to pas a different
value for target through a hidden form field, so the #target2 can be
dynamically changed to #target20, #target40 etc. Thanks.
<script type="text/javascript">
$(document).ready(function() {
$('.htmlForm').ajaxForm({
target: '#target2',
success: function() {
$('#target2').fadeIn('slow');
}
});
});
</script>
and the form html
<form class="htmlForm" action="ajax-data.php" method="post">
<input type="hidden" name="target" value="ztest" />
Message: <input type="text" name="message" value="Hello HTML" />
<input type="submit" value="Echo as HTML" />
</form>
and the div to be updated
<div id="ztest"></div>
another form
<form class="htmlForm" action="ajax-data.php" method="post">
<input type="hidden" name="target" value="ztest2" />
Message: <input type="text" name="message" value="Hello HTML" />
<input type="submit" value="Echo as HTML" />
</form>
and another div to be updated
<div id="ztest2"></div>
How to differentiate between pipe and interactive stdin
How to differentiate between pipe and interactive stdin
So far, I have that if the filename argument (fname) is left empty, the
program reads stdin automatically.
if (!strcmp(fname, ""))
fin = stdin;
But I need to know whether that stdin was piped in, or interactive,
because I could possibly get something like:
rsm: reading from (stdin)
^Z
rsm:(stdin):1: not an attribute: `√┘2ç∩'
if interactive input was used. Is there some sort of library function I
could use?
So far, I have that if the filename argument (fname) is left empty, the
program reads stdin automatically.
if (!strcmp(fname, ""))
fin = stdin;
But I need to know whether that stdin was piped in, or interactive,
because I could possibly get something like:
rsm: reading from (stdin)
^Z
rsm:(stdin):1: not an attribute: `√┘2ç∩'
if interactive input was used. Is there some sort of library function I
could use?
How to correctly extend a class in C++ and writing its header file?
How to correctly extend a class in C++ and writing its header file?
I'm pretty new to C++ and I'm trying to create my first little project. I
encounter some problems during compilation. It says C2504 Person: base
class undefined. I know that, in a header file, I need to declare or
include tha class that I'm extending in the correspondent *.cpp file. I'll
write the code to understand better.
main.cpp
#include <Windows.h>
#include "client.h"
using namespace person;
using namespace std;
int __stdcall WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int cmdShow)
{
try
{
Person *p = new Client;
// DO STUFF
}
catch(Exception &e)
{
//Error, so let's exit 1
return 1;
}
//No errors, so we return with 0
return 0;
}
client.cpp
#include <time.h>
#include <ctype.h>
#include <string>
#include "client.h"
using namespace person;
using namespace std;
class Client : public Person {
public:
Client()
{
//DO STUFF
}
void onMessage(const char * const message)
throw(Exception &)
{
//DO STUFF
}
private:
void gen_random(char *s, const int len) {
//DO STUFF
}
};
client.h
#ifndef CLIENT_H
#define CLIENT_H
#include "person.h"
class Client : public Person {
public:
Client();
void onMessage(const char * const message) throw(Exception &);
private:
void gen_random(char *s, const int len);
};
I'm pretty new to C++ and I'm trying to create my first little project. I
encounter some problems during compilation. It says C2504 Person: base
class undefined. I know that, in a header file, I need to declare or
include tha class that I'm extending in the correspondent *.cpp file. I'll
write the code to understand better.
main.cpp
#include <Windows.h>
#include "client.h"
using namespace person;
using namespace std;
int __stdcall WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int cmdShow)
{
try
{
Person *p = new Client;
// DO STUFF
}
catch(Exception &e)
{
//Error, so let's exit 1
return 1;
}
//No errors, so we return with 0
return 0;
}
client.cpp
#include <time.h>
#include <ctype.h>
#include <string>
#include "client.h"
using namespace person;
using namespace std;
class Client : public Person {
public:
Client()
{
//DO STUFF
}
void onMessage(const char * const message)
throw(Exception &)
{
//DO STUFF
}
private:
void gen_random(char *s, const int len) {
//DO STUFF
}
};
client.h
#ifndef CLIENT_H
#define CLIENT_H
#include "person.h"
class Client : public Person {
public:
Client();
void onMessage(const char * const message) throw(Exception &);
private:
void gen_random(char *s, const int len);
};
Insert from back : Linked List
Insert from back : Linked List
I read the code from this site:
http://www.codeproject.com/Articles/24684/How-to-create-Linked-list-using-C-C,
but it gave me segmentation fault and I don't quite get it.
*I modified it to my struct
struct Node
{
int type;
char cmd[256];
struct Node *next;
};
void insert(int val, char arr[])
{
struct Node *temp1 = (struct Node*)malloc(sizeof(struct Node));
struct Node *temp2 = (struct Node*)malloc(sizeof(struct Node));
temp1 = head;
while(temp1->next != NULL)
temp1 = temp1->next;
temp2->type = val;
strcpy(temp2->cmd, arr);
temp2->next = NULL;
temp1->next = temp2;
}
What is wrong with this code?
I read the code from this site:
http://www.codeproject.com/Articles/24684/How-to-create-Linked-list-using-C-C,
but it gave me segmentation fault and I don't quite get it.
*I modified it to my struct
struct Node
{
int type;
char cmd[256];
struct Node *next;
};
void insert(int val, char arr[])
{
struct Node *temp1 = (struct Node*)malloc(sizeof(struct Node));
struct Node *temp2 = (struct Node*)malloc(sizeof(struct Node));
temp1 = head;
while(temp1->next != NULL)
temp1 = temp1->next;
temp2->type = val;
strcpy(temp2->cmd, arr);
temp2->next = NULL;
temp1->next = temp2;
}
What is wrong with this code?
Saturday, 28 September 2013
How apex get executed in Salesforce
How apex get executed in Salesforce
i write a Batch apex.i write an execute method .which is using a static
variable of another class.because it is shhared.any one can use it and
change it.
public void execute(Database.BatchableContext BC, List<sObject> scope){
x=GMirror.x;
...........
...........
.........
y =GMirror.x;
}
i want to know each batch of 5 in my case will run in transaction or means
at this time only this method is running nothing else or in other words i
want to know if using another class's method execution in between time
first statement execute x=GMirror.x;
and second statement y =GMirror.x;
its possible by another parallel execution of another class's method that
these value of GMirror.x get changed ?? these execution this necessary
that no one changed value of GMirror.x or value of GMirror.x can be
changed by another parallel execution.Please clarify .
i write a Batch apex.i write an execute method .which is using a static
variable of another class.because it is shhared.any one can use it and
change it.
public void execute(Database.BatchableContext BC, List<sObject> scope){
x=GMirror.x;
...........
...........
.........
y =GMirror.x;
}
i want to know each batch of 5 in my case will run in transaction or means
at this time only this method is running nothing else or in other words i
want to know if using another class's method execution in between time
first statement execute x=GMirror.x;
and second statement y =GMirror.x;
its possible by another parallel execution of another class's method that
these value of GMirror.x get changed ?? these execution this necessary
that no one changed value of GMirror.x or value of GMirror.x can be
changed by another parallel execution.Please clarify .
how to prevent going back to previous page
how to prevent going back to previous page
For a windows phone 8 app I'm developing, I had to load some data at the
starting of the app. For that matter I designed a page called
SplashScreen.xaml that loads the data and after all the loading is done I
navigate to the MainPage.xaml using:
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
Now when the user is in the main page and taps the back button on the
phone instead of going out of the app(which is the default gesture) goes
back to the SplashScreen.xaml, making them unable to go out of the
app(except for taping the start button which take's the app to background)
and of course giving them a bad impression. The question is How to prevent
going back to the previous page Thank you all.
For a windows phone 8 app I'm developing, I had to load some data at the
starting of the app. For that matter I designed a page called
SplashScreen.xaml that loads the data and after all the loading is done I
navigate to the MainPage.xaml using:
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
Now when the user is in the main page and taps the back button on the
phone instead of going out of the app(which is the default gesture) goes
back to the SplashScreen.xaml, making them unable to go out of the
app(except for taping the start button which take's the app to background)
and of course giving them a bad impression. The question is How to prevent
going back to the previous page Thank you all.
Getting similar pattern sub strings (python)
Getting similar pattern sub strings (python)
I have a large string and I want to get all the patterns
str = "name":"temp1","class":"temp2""name":"temp3","class":"temp4"
Now I want the name and class values how can I take those from the above
string.
I have a large string and I want to get all the patterns
str = "name":"temp1","class":"temp2""name":"temp3","class":"temp4"
Now I want the name and class values how can I take those from the above
string.
Subscribe to:
Posts (Atom)