Search Results

Search found 43 results on 2 pages for 'freddy rios'.

Page 1/2 | 1 2  | Next Page >

  • Issues with forwarding Iptables

    - by Ricardo Rios
    I have some issues with my redirectioning lines on iptables, it seems it does not work, any help will be appreciated iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o eth0 -j SNAT --to 10.10.10.1 iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j DNAT --to 10.10.10.1:8080 iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 iptables -t nat -A PREROUTING -d 200.59.189.125 -p tcp --dport 8081 -j DNAT --to 192.168.2.51:8081 iptables -t nat -A PREROUTING -d 200.59.189.125 -p tcp --dport 34551 -j DNAT --to 192.168.2.51:8081 iptables -t nat -A PREROUTING -d 200.59.189.125 -p tcp --dport 8082 -j DNAT --to 192.168.2.52:8082 iptables -t nat -A PREROUTING -d 200.59.189.125 -p tcp --dport 34552 -j DNAT --to 192.168.2.52:8082 iptables -t nat -A PREROUTING -d 200.59.189.125 -p tcp --dport 8083 -j DNAT --to 192.168.2.53:8083 iptables -t nat -A PREROUTING -d 200.59.189.125 -p tcp --dport 34553 -j DNAT --to 192.168.2.53:8083 iptables -t nat -A PREROUTING -d 200.59.189.125 -p tcp --dport 8084 -j DNAT --to 192.168.2.54:8084 iptables -t nat -A PREROUTING -d 200.59.189.125 -p tcp --dport 34554 -j DNAT --to 192.168.2.54:8084 iptables -t nat -A PREROUTING -d 200.59.189.125 -p tcp --dport 8085 -j DNAT --to 192.168.2.55:8085 iptables -t nat -A PREROUTING -d 200.59.189.125 -p tcp --dport 34555 -j DNAT --to 192.168.2.55:80 echo Ejecutadas Reglas del Firewall

    Read the article

  • LibreOffice hangs everytime I click into it

    - by Freddy
    I've searched askubuntu for a solution but couldn't find anything helpful for me. I installed the latest version of ubuntu (13.10; 64-bit) yesterday (so I'm relatively new and unexperienced about it) and some programs as well. Today I wanted to try the LibreOffice package which comes with ubuntu by default. So I first started LO Impress, it showed me the default slide where it says something like "Add your title/text here" (I don't know exactly, I'm using my system in German). As soon as i clicked on this text, my entire system didn't react, I couldn't even click the stuff in the upper right corner (where the date, shutdown functions etc. are), nor the items on the launcher bar on the left. After 10 seconds or so, everything seemed to work properly again. But when I clicked into the LO Impress again, the same procedure as described happened again (cmpletely stuck for about 10 sec). Anybody got a solution for this? If you need more information, just tell me. Thanks in advance!

    Read the article

  • How can i get latency when using Game Center?

    - by Freddy
    I'm pretty new to network programming. Basically I'm using game center for making a relatively simple iPhone game using Game-center p2p. However i'm now working on a algorithm to improve the multiplayer performance. But, I need to know how long it took for a package to travel from one device to the another device (latency) for the algorithm to work good. As for now, I have solved the problem by sending a double with time interval since 1970 in the package and then I compare it with the time at the other device. However I have heard that the NSDate methods is connected to the internet, which also will cause latency so the time interval would not be perfectly correct. What is the ideal way to check for how long it take for a package to be sent?

    Read the article

  • How can I fix latency problems for car game?

    - by Freddy
    Basically I'm trying to make a online car racing game for IOS using Game Center real time multiplayer. I have setup a timer that sends data every 0.02 seconds to the other player with the current position and current angle. However sometimes, it will take LONGER then these 0.02 seconds for the package to be sent and then received. In this case i have implemented a method that "calculate" what the next position should be if no position is received based on the last position and angle. However, when the data then receives for let say 0.04 seconds after, it will change back to the last position, which will result in the car "jumping" back and lag. And If i just keep ignoring the data it will never take any input from the other user. Is their any way to prevent this? I suppose this needs to be fixed with some client-sided algorithm.

    Read the article

  • How can i get almost pixel perfect collision detection in a multiplayer game?

    - by Freddy
    I'm currently working on a multiplayer game for iPhone. The problem i have, as with all multiplayer games, is that the other user will always see everything at a non-constant delay. The game I'm making need to have a almost pixel perfect collision detection, but 1 or 2 pixels off is not that big of a deal. How can I possibly get this working? I guess I could just set local player to also be at X ms delay. However this will probably just be worse and feel sloppy when the user input. I know this problem is probably something network programmers deal with everyday and I would be glad if someone could give me a possible solution for this.

    Read the article

  • php fuel 42000 error

    - by ryanc1256
    I don't get whats wrong. So this is the full error I get... Fuel\Core\Database_Exception [ 42000 ]: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'to, from, message, checked) VALUES ('1', 'freddy', 'bob', 'message', '1')' at line 1 with query: "INSERT INTO chatmes (id, to, from, message, checked) VALUES ('1', 'freddy', 'bob', 'message', '1')" and this my php code which is supposably giving me the error <?php define('DOCROOT', __DIR__.DIRECTORY_SEPARATOR); define('APPPATH', realpath('/var/www/vhosts/grubber.co.nz/httpdocs/fuel/app/').DIRECTORY_SEPARATOR); define('PKGPATH', realpath('/var/www/vhosts/grubber.co.nz/httpdocs/fuel/packages/').DIRECTORY_SEPARATOR); define('COREPATH', realpath('/var/www/vhosts/grubber.co.nz/httpdocs/fuel/core/').DIRECTORY_SEPARATOR); require APPPATH.'bootstrap.php'; error_reporting(-1); ini_set('display_errors', 1); $to = $_GET['to']; $from = $_GET['from']; $message = $_GET['message']; $dquotes = '"'; $squotes = "'"; $message = str_replace($dquotes, "&quot", $message); $message = str_replace($squotes, "&#039", $message); DB::insert('chatmes')->set(array('id' => '1', 'to' => 'freddy', 'from' => 'bob', 'message' => 'message', 'checked' => '1'))->execute(); ?> I dont know what I am doing wrong?? Also the connection im using is PDO At the moment the only line thats giving me a error is, the db update query

    Read the article

  • What's the significance of this Google Apps error code '0x8004010B' ?

    - by Freddy
    There seems to be a lack of good information around this particular Google Apps error code. Has anyone found common environmental information that causes this error? Any kind of solution? Uninstalling/re-installing Google Sync doesn't seem to do anything, I've run Outlook's executable that scans/fixes the PST file etc. Task 'Google Apps - ::user email address:: - Sending' reported error (0x8004010B) : 'Unknown Error 0x8004010B' I found a listing of error codes for the Gdata API but nothing for these types of 'unknown' error codes. Does Google have available a list of common 'unknown' error codes/messages? Thanks in advance.

    Read the article

  • CKeditor integration with FCKeditor filebrowser

    - by -provideralexander.rios
    Hi everybody. I'm using CKeditor 3 and I need integrate a filebrowser/uploader. It need to be free. I tried to integrate the one what come with FCKeditor but I allways got and xml error: http://pastie.org/743024 I'm trying to do it in this way: <script type="text/javascript"> window.onload = function(){ CKEDITOR.config.language='es'; CKEDITOR.config.forcePasteAsPlainText = true; CKEDITOR.config.enterMode = CKEDITOR.ENTER_DIV; CKEDITOR.replace('ncCont',{ filebrowserBrowseUrl: 'filemanager/browser/default/browser.html', filebrowserUploadUrl : 'filemanager/connectors/php/upload.php' }); }; </script> Can the FCKeditor get integrated with CKeditor?? if yes, how this can get done? if don't, knows somebody a free filebrowser/uploader?? Thanks in advance.

    Read the article

  • What is the best way to move a UIToolbar?

    - by Ferdinand Rios
    Here is an interesting problem. On the iPhone, I have a view set up that has a toolbar on the bottom of the screen. I am currently trying to make this a universal app so that it runs on iPad as well. I would like the toolbar to be at the top of the iPad screen, so in the viewDidLoad method of the specific viewController I have the following code. if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { //move the toolbar to the top of the page and move the webview down by the height of the toolbar CGRect toolBarFrame = self.aToolBar.frame; CGRect webFrame = self.aWebView.frame; webFrame.origin.y = toolBarFrame.size.height; [self.aWebView setFrame:webFrame]; toolBarFrame.origin.y = 0; [self.aToolBar setFrame:toolBarFrame]; [Utils errorString:[NSString stringWithFormat:@"origen: x=%f y=%f", self.aToolBar.frame.origin.x, self.aToolBar.frame.origin.y]]; [Utils errorString:[NSString stringWithFormat:@"origen: x=%f y=%f", self.aWebView.frame.origin.x, self.aWebView.frame.origin.y]]; } The problem I am having is that the webView moves down fine, but the toolbar only moves up to about what seems to be the height of a iPhone screen. The call to errorString tells me that the webView's origin is at 0,44 (where it should be) and that the toolbar's origin is at 0,0, but it is actually somewhere in the middle of the screen! Anybody have a clue what is going on here?

    Read the article

  • how to keep a nativewindow on top

    - by Freddy Rios
    I need to keep a NativeWindow I am creating on top of the main window of the application. Currently I am using alwaysInFront = true, which is not limited to the windows in the application. I can successfully synchronize the minimize/restore/move/resize actions, so the top window behaves appropriately in those cases. Even though using this option has the drawback that if I alt-tab to other application the window goes on top of the other application. Because of the above I am trying to get it to work without using the alwaysInFront. I have tried using orderInFrontOf and orderToFront, which gets it in place but when I click an area in the main window the top one becomes hidden i.e. air makes it the top one. I have tried capturing activate/deactivate events but it only happens on the first click, so on the second click the top window becomes hidden again. I also tried making the top window active when the main one becomes active, but that causes the main one to loose focus and I can't click on anything. Ps. I am doing this to improve the behavior of a HTMLOverlay I am using - see http://stackoverflow.com/questions/1044927/flex-air-htmlloader-blank-pop-up-window-when-flash-content-is-loaded/1077738#1077738

    Read the article

  • Extending configuration for .Net 3.5 Applications

    - by Maximiliano Rios
    Due to a requirement in my current project, I have to build a configuration manager to handle configurations that merge local config info with database one. Custom configuration doesn't fit my needs, problem is that I don't know what's the type before loading certain information, for example: Loading database information I will able to know what's myhandler's type. Not previously. So I thought to write my own handler but I can't let set blank as type for sections, in fact .net requires to know what's the type to match myhandler nodes. I'm thinking on building a different parser to read XML nodes but I would prefer to match this structure. I've not found any information to do that yet, is there any way? Can I extend or hook up something into the framework to be capable of loading on-the-fly types and validate nodes? Thanks in advance.

    Read the article

  • How to Import a CSV file containing multiple sections into R?

    - by PaulHurleyuk
    I want to import the contents of a csv file into R, the csv file contains multiple sections of data vertically, seperated by blank lines and asterisks. For example ******************************************************** * SAMPLE DATA ****************************************** ******************************************************** Name, DOB, Sex Rod, 1/1/1970, M Jane, 5/7/1980, F Freddy, 9.12,1965, M ******************************************************* * Income Data **************************************** ******************************************************* Name, Income Rod, 10000 Jane, 15000 Freddy, 7500 I would like to import this into R as two seperate dataframes. Currently I'm manually cutting the csv file up into smaller files, but I think I could do it using read.csv and the skip and nrows settings of read.csv, If I could work out where the secion breaks are. This gives me a logical TRUE for every blank line ifelse(readLines("DATA.csv")=="",TRUE,FALSE) I'm hoping someone has already solved this problem.

    Read the article

  • why does entity framework+mysql provider enumeration returns partial results with no exceptions

    - by Freddy Rios
    I'm trying to make sense of a situation I have using entity framework on .net 3.5 sp1 + MySQL 6.1.2.0 as the provider. It involves the following code: Response.Write("Products: " + plist.Count() + "<br />"); var total = 0; foreach (var p in plist) { //... some actions total++; //... other actions } Response.Write("Total Products Checked: " + total + "<br />"); Basically the total products is varying on each run, and it isn't matching the full total in plist. Its varies widely, from ~ 1/5th to half. There isn't any control flow code inside the foreach i.e. no break, continue, try/catch, conditions around total++, anything that could affect the count. As confirmation, there are other totals captured inside the loop related to the actions, and those match the lower and higher total runs. I don't find any reason to the above, other than something in entity framework or the mysql provider that causes it to end the foreach when retrieving an item. The body of the foreach can have some good variation in time, as the actions involve file & network access, my best shot at the time is that when the .net code takes beyond certain threshold there is some type of timeout in the underlying framework/provider and instead of causing an exception it is silently reporting no more items for enumeration. Can anyone give some light in the above scenario and/or confirm if the entity framework/mysql provider has the above behavior? Update: I can't reproduce the behavior by using Thread.Sleep in a simple foreach in a test project, not sure where else to look for this weird behavior :(.

    Read the article

  • does entity framework or mysql provider swallows timeout exceptions on enumeration of result?!

    - by Freddy Rios
    I'm trying to make sense of a situation I have using entity framework on .net 3.5 sp1 + MySQL 6.1.2.0 as the provider. It involves the following code: Response.Write("Products: " + plist.Count() + "<br />"); var total = 0; foreach (var p in plist) { //... some actions total++; //... other actions } Response.Write("Total Products Checked: " + total + "<br />"); Basically the total products is varying on each run, and it isn't matching the full total in plist. Its varies widely, from ~ 1/5th to half. There isn't any control flow code inside the foreach i.e. no break, continue, try/catch, conditions around total++, anything that could affect the count. As confirmation, there are other totals captured inside the loop related to the actions, and those match the lower and higher total runs. I don't find any reason to the above, other than something in entity framework or the mysql provider that causes it to end the foreach when retrieving an item. The body of the foreach can have some good variation in time, as the actions involve file & network access, my best shot at the time is that when it takes beyond certain threshold there is some type of timeout in the underlying framework/provider and instead of causing an exception it is silently reporting no more items for enumeration. Can anyone give some light in the above scenario and/or confirm if the entity framework/mysql provider has the above behavior?

    Read the article

  • Class initialization issues loading java.util.LogManager in Android Dalvik VM

    - by Freddy B. Rose
    I've done changes in an Android native library and installed a new system.img file but am now getting an unrelated Error on startup. I can get past it by swallowing the error but I wanted to know if anyone can explain what the issue is. The Android implementation of Logger.java claims that it is Forcing the LogManager to be initialized since its class init code performs necessary one-time setup. But this forced initialization results in a NoClassDefFoundError. I'm thinking that it has something to do with the class not having been preloaded by Zygote yet but am not that familiar with the whole class loaders and VM business. If anyone has some insight it would be greatly appreciated. Thanks. I/Zygote ( 1253): Preloading classes... D/skia ( 1253): ------ build_power_table 1.4 D/skia ( 1253): ------ build_power_table 0.714286 W/dalvikvm( 1253): Exception Ljava/lang/StackOverflowError; thrown during Ljava/util/logging/LogManager;. W/dalvikvm( 1253): Exception Ljava/lang/NoClassDefFoundError; thrown during Ljava/security/Security;. W/dalvikvm( 1253): Exception Ljava/lang/ExceptionInInitializerError; thrown during Landroid/net/http/HttpsConnection;. E/Zygote ( 1253): Error preloading android.net.http.HttpsConnection. E/Zygote ( 1253): java.lang.ExceptionInInitializerError E/Zygote ( 1253): at java.lang.Class.classForName(Native Method) E/Zygote ( 1253): at java.lang.Class.forName(Class.java:237) E/Zygote ( 1253): at java.lang.Class.forName(Class.java:183) E/Zygote ( 1253): at com.android.internal.os.ZygoteInit.preloadClasses(ZygoteInit.java:295) E/Zygote ( 1253): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590) E/Zygote ( 1253): at dalvik.system.NativeStart.main(Native Method) E/Zygote ( 1253): Caused by: java.lang.ExceptionInInitializerError E/Zygote ( 1253): at javax.net.ssl.KeyManagerFactory$1.run(KeyManagerFactory.java:57) E/Zygote ( 1253): at javax.net.ssl.KeyManagerFactory$1.run(KeyManagerFactory.java:56) E/Zygote ( 1253): at java.security.AccessController.doPrivilegedImpl(AccessController.java:264) E/Zygote ( 1253): at java.security.AccessController.doPrivileged(AccessController.java:84) E/Zygote ( 1253): at javax.net.ssl.KeyManagerFactory.getDefaultAlgorithm(KeyManagerFactory.java:55) E/Zygote ( 1253): at org.apache.harmony.xnet.provider.jsse.SSLParameters.(SSLParameters.java:142) E/Zygote ( 1253): at org.apache.harmony.xnet.provider.jsse.SSLContextImpl.engineInit(SSLContextImpl.java:82) E/Zygote ( 1253): at android.net.http.HttpsConnection.initializeEngine(HttpsConnection.java:101) E/Zygote ( 1253): at android.net.http.HttpsConnection.(HttpsConnection.java:65) E/Zygote ( 1253): ... 6 more E/Zygote ( 1253): Caused by: java.lang.NoClassDefFoundError: java.util.logging.LogManager E/Zygote ( 1253): at java.util.logging.Logger.initHandler(Logger.java:419) E/Zygote ( 1253): at java.util.logging.Logger.log(Logger.java:1094) E/Zygote ( 1253): at java.util.logging.Logger.warning(Logger.java:906) E/Zygote ( 1253): at org.apache.harmony.luni.util.MsgHelp.loadBundle(MsgHelp.java:61) E/Zygote ( 1253): at org.apache.harmony.luni.util.Msg.getString(Msg.java:60) E/Zygote ( 1253): at java.io.BufferedInputStream.read(BufferedInputStream.java:316) E/Zygote ( 1253): at java.io.FilterInputStream.read(FilterInputStream.java:138) E/Zygote ( 1253): at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:157) E/Zygote ( 1253): at java.io.BufferedInputStream.read(BufferedInputStream.java:243) E/Zygote ( 1253): at java.util.Properties.load(Properties.java:302) E/Zygote ( 1253): at java.security.Security$1.run(Security.java:80) E/Zygote ( 1253): at java.security.Security$1.run(Security.java:67) E/Zygote ( 1253): at java.security.AccessController.doPrivilegedImpl(AccessController.java:264) E/Zygote ( 1253): at java.security.AccessController.doPrivileged(AccessController.java:84) E/Zygote ( 1253): at java.security.Security.(Security.java:66) E/Zygote ( 1253): ... 15 more W/dalvikvm( 1253): threadid=3: thread exiting with uncaught exception (group=0x2aac6170)

    Read the article

  • .net WCF DateTime

    - by freddy smith
    I want to be able to safely send DateTime's over WCF without having to worry about any implicit or automatic TimeZone conversions. The dates I want to send are "logical" dates. year month day, there should be no time component. I have various server processes and client process that run on a variety of machines with different TimeZone settings. What I would like to ensure is that when a user enters a date in a textfield (or uses a date picker component) on any client that exact what they see at data entry is what is sent over WCF, used by the server and seen by other clients when they request the data. I am a little confused by the various questions and answers on this site concerning DateTime.Kind (unspecified, UTC, local).

    Read the article

  • Class initialization issues loading java.util.logging.LogManager in Android Dalvik VM

    - by Freddy B. Rose
    I've done changes in an Android native library and installed a new system.img file but am now getting an unrelated Error on startup. I can get past it by swallowing the error but I wanted to know if anyone can explain what the issue is. The Android implementation of Logger.java claims that it is Forcing the LogManager to be initialized since its class init code performs necessary one-time setup. But this forced initialization results in a NoClassDefFoundError. I'm thinking that it has something to do with the class not having been preloaded by Zygote yet but am not that familiar with the whole class loaders and VM business. If anyone has some insight it would be greatly appreciated. Thanks. I/Zygote ( 1253): Preloading classes... D/skia ( 1253): ------ build_power_table 1.4 D/skia ( 1253): ------ build_power_table 0.714286 W/dalvikvm( 1253): Exception Ljava/lang/StackOverflowError; thrown during Ljava/util/logging/LogManager;. W/dalvikvm( 1253): Exception Ljava/lang/NoClassDefFoundError; thrown during Ljava/security/Security;. W/dalvikvm( 1253): Exception Ljava/lang/ExceptionInInitializerError; thrown during Landroid/net/http/HttpsConnection;. E/Zygote ( 1253): Error preloading android.net.http.HttpsConnection. E/Zygote ( 1253): java.lang.ExceptionInInitializerError E/Zygote ( 1253): at java.lang.Class.classForName(Native Method) E/Zygote ( 1253): at java.lang.Class.forName(Class.java:237) E/Zygote ( 1253): at java.lang.Class.forName(Class.java:183) E/Zygote ( 1253): at com.android.internal.os.ZygoteInit.preloadClasses(ZygoteInit.java:295) E/Zygote ( 1253): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590) E/Zygote ( 1253): at dalvik.system.NativeStart.main(Native Method) E/Zygote ( 1253): Caused by: java.lang.ExceptionInInitializerError E/Zygote ( 1253): at javax.net.ssl.KeyManagerFactory$1.run(KeyManagerFactory.java:57) E/Zygote ( 1253): at javax.net.ssl.KeyManagerFactory$1.run(KeyManagerFactory.java:56) E/Zygote ( 1253): at java.security.AccessController.doPrivilegedImpl(AccessController.java:264) E/Zygote ( 1253): at java.security.AccessController.doPrivileged(AccessController.java:84) E/Zygote ( 1253): at javax.net.ssl.KeyManagerFactory.getDefaultAlgorithm(KeyManagerFactory.java:55) E/Zygote ( 1253): at org.apache.harmony.xnet.provider.jsse.SSLParameters.(SSLParameters.java:142) E/Zygote ( 1253): at org.apache.harmony.xnet.provider.jsse.SSLContextImpl.engineInit(SSLContextImpl.java:82) E/Zygote ( 1253): at android.net.http.HttpsConnection.initializeEngine(HttpsConnection.java:101) E/Zygote ( 1253): at android.net.http.HttpsConnection.(HttpsConnection.java:65) E/Zygote ( 1253): ... 6 more E/Zygote ( 1253): Caused by: java.lang.NoClassDefFoundError: java.util.logging.LogManager E/Zygote ( 1253): at java.util.logging.Logger.initHandler(Logger.java:419) E/Zygote ( 1253): at java.util.logging.Logger.log(Logger.java:1094) E/Zygote ( 1253): at java.util.logging.Logger.warning(Logger.java:906) E/Zygote ( 1253): at org.apache.harmony.luni.util.MsgHelp.loadBundle(MsgHelp.java:61) E/Zygote ( 1253): at org.apache.harmony.luni.util.Msg.getString(Msg.java:60) E/Zygote ( 1253): at java.io.BufferedInputStream.read(BufferedInputStream.java:316) E/Zygote ( 1253): at java.io.FilterInputStream.read(FilterInputStream.java:138) E/Zygote ( 1253): at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:157) E/Zygote ( 1253): at java.io.BufferedInputStream.read(BufferedInputStream.java:243) E/Zygote ( 1253): at java.util.Properties.load(Properties.java:302) E/Zygote ( 1253): at java.security.Security$1.run(Security.java:80) E/Zygote ( 1253): at java.security.Security$1.run(Security.java:67) E/Zygote ( 1253): at java.security.AccessController.doPrivilegedImpl(AccessController.java:264) E/Zygote ( 1253): at java.security.AccessController.doPrivileged(AccessController.java:84) E/Zygote ( 1253): at java.security.Security.(Security.java:66) E/Zygote ( 1253): ... 15 more W/dalvikvm( 1253): threadid=3: thread exiting with uncaught exception (group=0x2aac6170)

    Read the article

  • LiNQ to Entities, Include less

    - by Freddy
    Hi, If you are making a LinQ to entities expression for ClassA where A has a relation to ClassB like this: var temp = from p in myEntities.ClassA.Include("ClassB") where ... select p; You will get a set of ClassA:s with the reference to ClassB loaded. The thing in my case is that I dont really need to load ALL the ClassB-references, just a few of them. But I dont want to loop through the list of ClassA:s and load them individually, i want my database operations to be fewer and bigger instead of reading small chunks here and there. Is it possible to put some kind of restrictions on which references to include or do you have to accept this all or nothing style?

    Read the article

  • .net dictionary and lookup add / update

    - by freddy smith
    I am sick of doing blocks of code like this for various bits of code I have: if (dict.ContainsKey[key]) { dict[key] = value; } else { dict.Add(key,value); } and for lookups (i.e. key - list of value) if (lookup.ContainsKey[key]) { lookup[key].Add(value); } else { lookup.Add(new List<valuetype>); lookup[key].Add(value); } Is there another collections lib or extension method I should use to do this in one line of code no matter what the key and value types are? e.g. dict.AddOrUpdate(key,value) lookup.AddOrUpdate(key,value)

    Read the article

  • BackgroundWorker vs background Thread

    - by freddy smith
    I have a stylistic question about the choice of background thread implementation I should use on a windows form app. Currently I have a BackgroundWorker on a form that has an infinite (while(true)) loop. In this loop I use WaitHandle.WaitAny to keep the thread snoozing until something of interest happens. One of the event handles I wait on is a "stopthread" event so that I can break out of the loop. This event is signaled when from my overridden Form.Dispose(). I read somewhere that BackgroundWorker is really intended for operations that you dont want to tie up the UI with and have an finite end - like downloading a file, or processing a sequence of items. In this case the "end" is unknown and only when the window is closed. Therefore would it be more appropriate for me to use a background Thread instead of BackgroundWorker for this purpose?

    Read the article

  • .net 4.0 concurrent queue dictionary

    - by freddy smith
    I would like to use the new concurrent collections in .NET 4.0 to solve the following problem. The basic data structure I want to have is a producer consumer queue, there will be a single consumer and multiple producers. There are items of type A,B,C,D,E that will be added to this queue. Items of type A,B,C are added to the queue in the normal manner and processed in order. However items of type D or E can only exist in the queue zero or once. If one of these is to be added and there already exists another of the same type that has not yet been processed then this should update that other one in-place in the queue. The queue position would not change (i.e. would not go to the back of the queue) after the update. Which .NET 4.0 classes would be best for this?

    Read the article

  • SQL Injection on INSERT

    - by freddy
    Hi, I'm currently testing Vulnerabiltys to SQL Injections for my companys application as an it-trainee. So I found, that the application is indeed vulnerable to injections because I can alter some of the insert statements. So I altered the insert Statement to this: INSERT INTO tablename( column, column1, column2, column3, column4,column5, column6, column7, column8 ) VALUES ( 10965972, 185796154, 25, 23,2023, '', CURRENT_DATE, 'v0201100', 18); DELETE * FROM tablename;-- , 2023,'a', CURRENT_DATE, 'v0201100', 18 ) I thought this should be a correct statement, but the MySQL Server returned this Error: MySQL Error: 1064 (You have an error in your SQL syntax;[...] Would be nice if somebody could help and tell my why the syntax is wrong... Thanks for your help :-)

    Read the article

1 2  | Next Page >