I want to make auto increment id in two MySQL tables (if in first table there is id=4 then it cannot be id=4 in the second table). My question is how can I do that in the best way?
CouchDB is great, I like its replication functionality, but it's a bit larger and slower when used in desktop application.
As I tested in intel duo core cpu,
12 seconds to load 10000 docs
10 seconds to insert 10000 doc, but need 20 seconds to update view, so total is 30 seconds
Is there any No SQL implementation which has the same replication functionality, but the size is very small, and the speed is quite good( 1 second to load 10000 docs).
Thanks
I'm trying to append to a char[] array that contains blank spaces on the end. The char array for example contains the characters 'aaa'. When I append the first time the method functions properly and outputs 'aaabbb'. The initial capacity of the array is set to 80 or multiples of 80. The second time I try and append my output looks like"aaabbb bbb". Any psuedocode would be great.
Is it possible to host 2 asp.net projects off one ip address? I don't have a domain name just an ip number. I'm running IIS7.
The first project runs and displays fine over the web by simply typing in the ip address into the browser but I'm having trouble accessing the second.
Currently both projects have virtual directories in IIS7.
Help is greatly appreciated.
Thx
I'm coding a networking application on Android.
I'm thinking of having a single UDP port and Datagram socket that receives all the datagrams that are sent to it and then have different processing queues for these messages.
I'm doubting if I should have a second or third UDP socket on standby. Some messages will be very short (100bytes or so), but others will have to transfer files.
My concern is, will the Android kernel drop the small messages if it's too busy handling the bigger ones?
Hi all, please help me close Blackberry map programmatically from my application.
I first call BB map and pass a map argument and it display seem smoothly, but in the second, when I change my map argument, BB map doesn't respond with the new argument, it keeps the old. I think I must close it before pass the new argument but don't know how to do that.
Thank you.
How can you display upside down text with a textview in Android?
In my case I have a 2 player game, where they play across from each other. I want to display test to the second player oriented to them.
hi,
I am new in the field of iphone development.
I want to render two images with the help of openGL one over the other the first image act as background and on the second image when the user touches then a method will execute.
Please help me out how to render these images.
thanks in advance
Hi All,
I have a crystal report which when generated has a last page that is blank except for the page footer (which indicates the current page, as well as the report title).
This only occurs when the data displayed on the second last page completely fills the page.
Would anyone have any ideas as to why this might be?
Thanks in advance!
1) i need set different class name for every menu item, based on a menu row (iterating, i need just a number)
<% control Menu(1) %>
<div class="mainmenu-item-$MenuItemRow"><a href="$Link">$MenuTitle</a></div>
<% end_control %>
2) is there a simple way to create an small second menu ?
The "Sleep" command as stated in many places over the internet (including here on this forum) DOES NOT WORK. Is it now an obsolete command?
I am writing the VBScript code like this:
sub button1_onclick()
Wscript.Sleep 1000
div1.innerHTML = textbox1.value
end sub
It should wait 1 second and then execute that simple command. This is an utterly simple statement but it does not work. Plain and simple. It comes up with an error every time saying:
Object Required: 'Wscript'
I seem to keep running into little tidbits that help drastically in different areas of different languages.
For instance, a few days ago I learned about EXPLAIN SELECT... for any MySQL query that seems to be going slow. It took my 196 second query to 0.0084 seconds.
I have a TextView with android:maxLength set to 3 and another with android:maxLength set to 7.
I want focus to automatically move to the second TextView once the 3 chars of the first TextView are filled up. Is this possible without inheriting TextView and writing a custom implementation ?
hey guys
i create two input text fields , one for title and another for permanent link
i need to update the second filed automatically when user is typing the tilte
how can i do such a thing in jquery /php
somehow im looking for a way to simulate wordpress creation of permanent link in post section
I want to know if there is a way to know when fscanf reads a whitespace or a new line.
Example:
formatting asking words italic
links returns
As fscanf read a string till it meets a newline or a whitespace(using %s), it'll read formatting and the space after it and before a. The thing is, is there a way to know that it read a space? And after it entered the second line is there is a way to know that it read a carriage return?
Hi there,
I'm writing a spatial data structure and I have a doubt about what's the best NODE implementation.
According to my design I have an abstract node entity and three classes which inherit from it: EMPTYNODE, FULLNODE, INTERNALNODE.
The first one has no particular data.
The second one has 1 reference to a generic element.
The third one has 2 references to other nodes.
I have found several ways to implement this situation (that I have already coded) but I can't decide what's the best.
The first solution that I have found is to use a single class Node that potentially performs all the operation in this way:
private static class Node {
private Elem elem = null;
private Node left = null, right = null;
public Elem getElem() {
assert isFull();
return elem;
}
public boolean isEmpty() {
return elem == null && left == null;
}
public boolean isFull() {
return elem != null;
}
public boolean isInternal() {
return elem == null && left != null;
}
}
The second solution is to write an explicit division by classes where every class offers only its methods. Obviously in this way we are obliged to perform several casts to the node objects.
private static abstract class Node {
public abstract boolean isEmpty();
public abstract boolean isFull();
public abstract boolean isInternal();
}
private static class FullNode extends Node{
private ITriangle elem;
@Override
public boolean isEmpty() {
return false;
}
@Override
public final boolean isFull() {
return true;
}
@Override
public final boolean isInternal() {
return false;
}
public Elem getElem() {
return elem;
}
}
The third one solution is to use the inheritance allowing every classes to offer all the methods, but the object type should by check by "isEmpty()" and similar methods. In case of wrong call we'll throw an exception.
private static abstract class Node {
public abstract boolean isEmpty();
public abstract boolean isFull();
public abstract boolean isInternal();
public abstract Elem getElem();
}
private static class Empty extends Node{
@Override
public boolean isEmpty() {
return true;
}
@Override
public final boolean isFull() {
return false;
}
@Override
public final boolean isInternal() {
return false;
}
@Override
public Elem getElem() {
throw new AssertionError();
}
}
What do you think about these three solutions?
Which one would you use?
Any other ideas?
Thanks for your help. Every idea will be appreciated.
Hi
I have created two different grid background and radio button style in my
App.xaml.
User can select any style to change the look of the page i.e: Changing the background and style of the radiobutton.
Now When I click on the raduio button the application navigates to another page and the style disappears.
Is there a way to Set the style in application level or I need to store the styleVar as Global Var and check on the second page load and then apply the styles as per the styleVar.
I have one website that hosts a webservice which uses membership provider authorization. I would like to be able to authenticate through my webservice call from a second site without getting bounced back to my login page on the webservice site. How can I accomplish this?
Hi, how can I "copy" the selected option between two s that have the same options using prototype ? I tried getting the selected option from the "master" combo using
function getSelectedArea() {
$$('#areacont1 option').find(function(ele){return !!ele.selected})
}
which returns null
And setting the second combo using
var c2ROptions = $$('select#areacont2 option')
c2ROptions[getSelectedArea()].selected = true
That obviously doesn't work because the function returns null.
Any hints?
Thanks.
I would like to apply my function to only elements that are deeper in the list structure.
For example, I would like to apply a certain function to list elements of second order only. Is this feasible with apply()?
> str(l)
List of 3
$ :List of 2
..$ : num 5
..$ : num 10
$ :List of 2
..$ : num 15
..$ : num 20
$ :List of 2
..$ : num 25
..$ : num 30
I have a few questions about CoreLocation and GPS.
First, what method in core location is used to continually get the users current coordinates? And at what interval should these be retrieved?
Second, should these coordinates be pushed into a NSMutableArray each time they are received, so that the array of coordinates will represent the users path?
Thanks, just wanting to get started getting me mind around this.
im new to iphone sdk programming, and have been stuck on this problem for days.
i want a button that toggles a uitextview. first click shows the textbox, second click hides it and so on.
it sounds very simple
hi_all()
I have a problem with parsing http response.. I try send some values to client
>>>>return HttpResponse(first=True,second=True)
when parsing:
$.post('get_values',"",function(data){
alert(data['first']); //The alert isn't shown!!!
});
what is the right way to extract values from httpresponse
maybe I make a mistake when create my response..