Daily Archives

Articles indexed Saturday June 5 2010

Page 32/79 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Trend: Rent a CIO for ERP Deployment

    The idea originated from quite a few failures or ERP disasters across the world and the impact that made to the organization. ERP projects take the largest pie in the IT investments of a company and ... [Author: Puneesh Lamba - Computers and Internet - June 05, 2010]

    Read the article

  • Reasons to Use a Work Order Software System

    Keeping track of the bottom line has never been more critical than in these trying economic times. That';s why many companies are choosing to use a work order system to better keep track of jobs and m... [Author: Belinda Verducci - Computers and Internet - June 05, 2010]

    Read the article

  • What You Need To Know About Photo Scanners

    Before memory cards were invented for easy camera-to-computer transfer, photo enthusiasts had to go through the process of having their films developed. While I do believe the traditional way is more... [Author: Karen Tomas - Computers and Internet - June 05, 2010]

    Read the article

  • Hook key & key combinations from keyboard with Qt 4.6

    - by Viet
    Let's say I have a window-less application which has only an icon on the Taskbar (Windows, Mac OS X & Linux). I want it to capture some key & key combinations, let's say Right Control + Right Shift. Upon keying in correct, combination, it will do something, say take screenshot. I can do window-less app, icon on the Taskbar and screen capture but I don't know how to monitor keyboard globally for key combinations. Please kindly advise. Any help or hint is greatly appreciated! Thanks in advance!

    Read the article

  • What classes should I map against with NHibernate?

    - by apollodude217
    Currently, we use NHibernate to map business objects to database tables. Said business objects enforce business rules: The set accessors will throw an exception on the spot if the contract for that property is violated. Also, the properties enforce relationships with other objects (sometimes bidirectional!). Well, whenever NHibernate loads an object from the database (e.g. when ISession.Get(id) is called), the set accessors of the mapped properties are used to put the data into the object. What's good is that the middle tier of the application enforces business logic. What's bad is that the database does not. Sometimes crap finds its way into the database. If crap is loaded into the application, it bails (throws an exception). Sometimes it clearly should bail because it cannot do anything, but what if it can continue working? E.g., an admin tool that gathers real-time reports runs a high risk of failing unnecessarily instead of allowing an admin to even fix a (potential) problem. I don't have an example on me right now, but in some instances, letting NHibernate use the "front door" properties that also enforce relationships (especially bidi) leads to bugs. What are the best solutions? Currently, I will, on a per-property basis, create a "back door" just for NHibernate: public virtual int Blah {get {return _Blah;} set {/*enforces BR's*/}} protected virtual int _Blah {get {return blah;} set {blah = value;}} private int blah; I showed the above in C# 2 (no default properties) to demonstrate how this gets us basically 3 layers of, or views, to blah!!! While this certainly works, it does not seem ideal as it requires the BL to provide one (public) interface for the app-at-large, and another (protected) interface for the data access layer. There is an additional problem: To my knowledge, NHibernate does not give you a way to distinguish between the name of the property in the BL and the name of the property in the entity model (i.e. the name you use when you query, e.g. via HQL--whenever you give NHibernate the name (string) of a property). This becomes a problem when, at first, the BR's for some property Blah are no problem, so you refer to it in your O/R mapping... but then later, you have to add some BR's that do become a problem, so then you have to change your O/R mapping to use a new _Blah property, which breaks all existing queries using "Blah" (common problem with programming against strings). Has anyone solved these problems?!

    Read the article

  • SSH issue when do the Git clone

    - by palani
    Hi i have my own ubuntu linux box .... in that i have /home/username/.ssh/id_rsa.pub .. i copied the public key and paste the key into Git Hub. when i try to clone the git repository it says the following error warning: Authentication failed. Disconnected; no more authentication methods available (No further authentication methods available.). I have no idea what is wrong with that.... i have putty tool which connect my server with doing authenetication. becuase i copied my public key to my server known host folder. Can any one please help on this .... its heart breaking here.......

    Read the article

  • Can we use preferences accress multiple different acvtivities in android?

    - by Maneesh
    I save preferences in one activities but not able to get saved preferences in other activity. I can access saved preferences in the same activity but not in other one. It is not giving me any error but always gibing null values in second activity. Below is the code: First Activity: SharedPreferences.Editor editor; editor.putString("token", access_token); editor.commit(); Second Activity: SharedPreferences prefs = getSharedPreferences(PREFS_NAME, 0);//getPreferences(0); String restoredtoken = prefs.getString("token", null); if (restoredtoken== null) { ///doing some task; }

    Read the article

  • Emulating old-school sprite flickering (theory and concept)

    - by Jeffrey Kern
    I'm trying to develop an oldschool NES-style video game, with sprite flickering and graphical slowdown. I've been thinking of what type of logic I should use to enable such effects. I have to consider the following restrictions if I want to go old-school NES style: No more than 64 sprites on the screen at a time No more than 8 sprites per scanline, or for each line on the Y axis If there is too much action going on the screen, the system freezes the image for a frame to let the processor catch up with the action From what I've read up, if there were more than 64 sprites on the screen, the developer would only draw high-priority sprites while ignoring low-priority ones. They could also alternate, drawing each even numbered sprite on opposite frames from odd numbered ones. The scanline issue is interesting. From my testing, it is impossible to get good speed on the XBOX 360 XNA framework by drawing sprites pixel-by-pixel, like the NES did. This is why in old-school games, if there were too many sprites on a single line, some would appear if they were cut in half. For all purposes for this project, I'm making scanlines be 8 pixels tall, and grouping the sprites together per scanline by their Y positioning. So, dumbed down I need to come up with a solution that.... 64 sprites on screen at once 8 sprites per 'scanline' Can draw sprites based on priority Can alternate between sprites per frame Emulate slowdown Here is my current theory First and foremost, a fundamental idea I came up with is addressing sprite priority. Assuming values between 0-255 (0 being low), I can assign sprites priority levels, for instance: 0 to 63 being low 63 to 127 being medium 128 to 191 being high 192 to 255 being maximum Within my data files, I can assign each sprite to be a certain priority. When the parent object is created, the sprite would randomly get assigned a number between its designated range. I would then draw sprites in order from high to low, with the end goal of drawing every sprite. Now, when a sprite gets drawn in a frame, I would then randomly generate it a new priority value within its initial priority level. However, if a sprite doesn't get drawn in a frame, I could add 32 to its current priority. For example, if the system can only draw sprites down to a priority level of 135, a sprite with an initial priority of 45 could then be drawn after 3 frames of not being drawn (45+32+32+32=141) This would, in theory, allow sprites to alternate frames, allow priority levels, and limit sprites to 64 per screen. Now, the interesting question is how do I limit sprites to only 8 per scanline? I'm thinking that if I'm sorting the sprites high-priority to low-priority, iterate through the loop until I've hit 64 sprites drawn. However, I shouldn't just take the first 64 sprites in the list. Before drawing each sprite, I could check to see how many sprites were drawn in it's respective scanline via counter variables . For example: Y-values between 0 to 7 belong to Scanline 0, scanlineCount[0] = 0 Y-values between 8 to 15 belong to Scanline 1, scanlineCount[1] = 0 etc. I could reset the values per scanline for every frame drawn. While going down the sprite list, add 1 to the scanline's respective counter if a sprite gets drawn in that scanline. If it equals 8, don't draw that sprite and go to the sprite with the next lowest priority. SLOWDOWN The last thing I need to do is emulate slowdown. My initial idea was that if I'm drawing 64 sprites per frame and there's still more sprites that need to be drawn, I could pause the rendering by 16ms or so. However, in the NES games I've played, sometimes there's slowdown if there's not any sprite flickering going on whereas the game moves beautifully even if there is some sprite flickering. Perhaps give a value to each object that uses sprites on the screen (like the priority values above), and if the combined values of all objects w/ sprites surpass a threshold, introduce the sprite flickering? IN CONCLUSION... Does everything I wrote actually sound legitimate and could work, or is it a pipe dream? What improvements can you all possibly think with this game programming theory of mine?

    Read the article

  • event name in sharpdevelop

    - by ieie
    Hi all, i want to ask abt Sharpdevelop. Can i change the control's event name in sharpdevelop ? I want to add "_" like in visual studio. For Example, button click event in Sharp develop defaulted to Button1Click. can i change to Button1_Click like in visualstudio ? Thanks.

    Read the article

  • Optimizing a lot of Scanner.findWithinHorizon(pattern, 0) calls

    - by darvids0n
    I'm building a process which extracts data from 6 csv-style files and two poorly laid out .txt reports and builds output CSVs, and I'm fully aware that there's going to be some overhead searching through all that whitespace thousands of times, but I never anticipated converting about about 50,000 records would take 12 hours. Excerpt of my manual matching code (I know it's horrible that I use lists of tokens like that, but it was the best thing I could think of): public static String lookup(List<String> tokensBefore, List<String> tokensAfter) { String result = null; while(_match(tokensBefore)) { // block until all input is read if(id.hasNext()) { result = id.next(); // capture the next token that matches if(_matchImmediate(tokensAfter)) // try to match tokensAfter to this result return result; } else return null; // end of file; no match } return null; // no matches } private static boolean _match(List<String> tokens) { return _match(tokens, true); } private static boolean _match(List<String> tokens, boolean block) { if(tokens != null && !tokens.isEmpty()) { if(id.findWithinHorizon(tokens.get(0), 0) == null) return false; for(int i = 1; i <= tokens.size(); i++) { if (i == tokens.size()) { // matches all tokens return true; } else if(id.hasNext() && !id.next().matches(tokens.get(i))) { break; // break to blocking behaviour } } } else { return true; // empty list always matches } if(block) return _match(tokens); // loop until we find something or nothing else return false; // return after just one attempted match } private static boolean _matchImmediate(List<String> tokens) { if(tokens != null) { for(int i = 0; i <= tokens.size(); i++) { if (i == tokens.size()) { // matches all tokens return true; } else if(!id.hasNext() || !id.next().matches(tokens.get(i))) { return false; // doesn't match, or end of file } } return false; // we have some serious problems if this ever gets called } else { return true; // empty list always matches } } Basically wondering how I would work in an efficient string search (Boyer-Moore or similar). My Scanner id is scanning a java.util.String, figured buffering it to memory would reduce I/O since the search here is being performed thousands of times on a relatively small file. The performance increase compared to scanning a BufferedReader(FileReader(File)) was probably less than 1%, the process still looks to be taking a LONG time. I've also traced execution and the slowness of my overall conversion process is definitely between the first and last like of the lookup method. In fact, so much so that I ran a shortcut process to count the number of occurrences of various identifiers in the .csv-style files (I use 2 lookup methods, this is just one of them) and the process completed indexing approx 4 different identifiers for 50,000 records in less than a minute. Compared to 12 hours, that's instant. Some notes (updated): I don't necessarily need the pattern-matching behaviour, I only get the first field of a line of text so I need to match line breaks or use Scanner.nextLine(). All ID numbers I need start at position 0 of a line and run through til the first block of whitespace, after which is the name of the corresponding object. I would ideally want to return a String, not an int locating the line number or start position of the result, but if it's faster then it will still work just fine. If an int is being returned, however, then I would now have to seek to that line again just to get the ID; storing the ID of every line that is searched sounds like a way around that. Anything to help me out, even if it saves 1ms per search, will help, so all input is appreciated. Thankyou! Usage scenario 1: I have a list of objects in file A, who in the old-style system have an id number which is not in file A. It is, however, POSSIBLY in another csv-style file (file B) or possibly still in a .txt report (file C) which each also contain a bunch of other information which is not useful here, and so file B needs to be searched through for the object's full name (1 token since it would reside within the second column of any given line), and then the first column should be the ID number. If that doesn't work, we then have to split the search token by whitespace into separate tokens before doing a search of file C for those tokens as well. Generalised code: String field; for (/* each record in file A */) { /* construct the rest of this object from file A info */ // now to find the ID, if we can List<String> objectName = new ArrayList<String>(1); objectName.add(Pattern.quote(thisObject.fullName)); field = lookup(objectSearchToken, objectName); // search file B if(field == null) // not found in file B { lookupReset(false); // initialise scanner to check file C objectName.clear(); // not using the full name String[] tokens = thisObject.fullName.split(id.delimiter().pattern()); for(String s : tokens) objectName.add(Pattern.quote(s)); field = lookup(objectSearchToken, objectName); // search file C lookupReset(true); // back to file B } else { /* found it, file B specific processing here */ } if(field != null) // found it in B or C thisObject.ID = field; } The objectName tokens are all uppercase words with possible hyphens or apostrophes in them, separated by spaces. Much like a person's name. As per a comment, I will pre-compile the regex for my objectSearchToken, which is just [\r\n]+. What's ending up happening in file C is, every single line is being checked, even the 95% of lines which don't contain an ID number and object name at the start. Would it be quicker to use ^[\r\n]+.*(objectname) instead of two separate regexes? It may reduce the number of _match executions. The more general case of that would be, concatenate all tokensBefore with all tokensAfter, and put a .* in the middle. It would need to be matching backwards through the file though, otherwise it would match the correct line but with a huge .* block in the middle with lots of lines. The above situation could be resolved if I could get java.util.Scanner to return the token previous to the current one after a call to findWithinHorizon. I have another usage scenario. Will put it up asap.

    Read the article

  • Change|Assign parent for the Model instance on Google App Engine Datastore

    - by Vladimir Prudnikov
    Is it possible to change or assign new parent to the Model instance that already in datastore? For example I need something like this task = db.get(db.Key(task_key)) project = db.get(db.Key(project_key)) task.parent = project task.put() but it doesn't works this way because task.parent is built-in method. I was thinking about creating a new Key instance for the task but there is no way to change key as well. Any thoughts?

    Read the article

  • Switch from Microsofts STL to STLport

    - by Laserallan
    Hi! I'm using quite much STL in performance critical C++ code under windows. One possible "cheap" way to get some extra performance would be to change to a faster STL library. According to this post STLport is faster and uses less memory, however it's a few years old. Has anyone made this change recently and what were your results?

    Read the article

  • Cache like stackoverflow

    - by Deumber
    I'm creating a ASP.NET MVC 2 application that envolve a section like questions here in stackoverflow (mine is with exams is another kind of application but can be extrapolate to same general idea of SO). OK I'm creating a cache per page, its mean something like this: [OutputCache(Duration=60, VaryByParam="page")] ActionResult AllQuestions(int page){...} But i want to invalidate that cache when a new question is created. What can i do. I'm open to suggestions, perhaps this is not the best way to solve this problem

    Read the article

  • connect to mysql server using realbasic

    - by Gbolahan
    Hello, tried connecting to mysql server in realbasic using the folowing code: dim db as MySQLCommunityServer db=New MySQLCommunityServer db.host="192.168.240.129" db.port=3306 db.databaseName="test" db.userName="test" db.Password="test" If db.Connect() then txt1.Text = "Connected" else txt1.Text = "Connection failed!"+ chr(13)+db.ErrorMessage end if and i get the following message connection failed! any suggestions.. Thanks

    Read the article

  • How to retrieve from two tables with same foriegn key repeated more than once?

    - by Sarenya
    How to display the datas of tables, that are linked by a primay key and foriegn key, where the foriegn key of the data repeats? For ex. I have two tables, ParentTable and Childtable. The primarykey of the Parent table acts as the foriegn key of the Child table. There are more than one record with same ParentId in Child table. How to retrieve them and display in a single Grid or List or any type of view?

    Read the article

  • StreetView Zoom problem in android?

    - by Praveen Chandrasekaran
    I refered this link.I am using the uri for streetview: Uri.parse("google.streetview:cbll=" + sv_lat_val + ","+ sv_long_val + "&cbp=1,45,,45,0.0&mz=0.0") But the zoom level always in Zoomed state. 1.0 is the normal zoom. so i set it for 0.0 . still its not zoomed out. why? But it working in default Google maps App? Any idea?

    Read the article

  • Find where a variable is defined in PHP (And/or SMARTY)?

    - by Jon
    I'm currently working on a very large project, and am under a lot of pressure to finish it soon, and I'm having a serious problem. The programmer who wrote this last defined variables in a very odd way - the config variables aren't all in the same file, they're spread out across the entire project of over 500 files and 100k+ lines of code, and I'm having a hell of a time figuring out where a certain variable is, so I can fix an issue. Is there a way to track this variable down? I believe he's using SMARTY (Which I can not stand, due to issues like this), and the variable is a template variable. I'm fairly sure that the variable I'm looking for was initially defined as a PHP variable, then that variable is passed into SMARTY, so I'd like to track down the PHP one, however if that's impossible - how can I track down where he defined the variable for SMARTY? P.S. I'm in Vista, and don't have ssh access to the server, so 'grep' is out of the question.

    Read the article

  • python and overflowing byte?

    - by Meloun
    Hi all, I need to make a variable with similar behaviour like in C lanquage. I need byte or unsigned char with range 0-255. This variable should overflow, that means... myVar = 255 myVar += 1 print myVar #!!myVar = 0!!

    Read the article

  • Index files for Subdomains

    - by user358994
    I was finally able to setup subdomains but now I have a problem when I try and access the subdomain by itself. For instance, when I visit sub.domain.com, I get a page not found error. However, when I visit sub.domain.com/index.php, I see my page. My theory is that when I visit sub.domain.com, the index file it searches for is not in the sub/ folder but instead in the root folder. I have directoryindex to look for index.html before index.php. There is a index.html in the root directory that is needed. So when I go to sub.domain.com, it thinks that sub.domain.com/index.html exists but then finds out it doesnt and sends me a 404. That is my theory. How would I fix this? Any ideas? Thanks.

    Read the article

  • What are the attributes that are need to Send with this FEDEX shipping script?

    - by Fero
    could any one please tell me what are the attributes that are send with $ship_data ? I am too confused about it. I know that ORIGIN ADDRESS, DESTINATION ADDRESS, NAME etc.. need to be send. But how the data should be aligned. Like name is FIRST, address is SECOND etc... Any help will be useful ** // create new fedex object $fed = new FedExDC('#########','#########'); $ship_data = array( 75= 'LBS', 16= 'Ma' , 13= '44 Main street' , 5= '312 stuart st', 1273= '01', 1274= '01', 18= '6173335555', 15= 'Boston', 23= '1', 9= '02134', 183= '6175556985', 8= 'MA', 117= 'US', 17= '02116', 50= 'US', 4= 'Vermonster LLC', 7= 'Boston', 1369= '1', 12= 'Jay Powers', 1333= '1', 1401= '1.0', 116= 1, 68= 'USD', 1368= 1, 1369= 1, 1370= 5 ); // Ship example $ship_Ret = $fed-ship_express($ship_data); if ($error = $fed-getError()) { echo "ERROR :". $error; } else { // Save the label to disk $fed-label('mylabel.png'); } /* tracking example $track_Ret = $fed-track( array( 29 = 790344664540, )); echo $fed-debug_str. "\n"; echo "Price ".$ship_Ret[1419];*/ echo ""; if ($error = $fed-getError()) { die("ERROR: ". $error); } else { // decode and save label $fed-label('myLabel.png'); echo $fed-debug_str. "\n"; echo "\n\n"; echo "Price $".$ship_Ret[1419]; echo "\n"; echo "Tracking# ".$ship_Ret[29]; } echo ""; ?** Thanks Fero

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >