Search Results

Search found 2579 results on 104 pages for 'mike peshka'.

Page 74/104 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • How to execute machine language from memory?

    - by Mike Curry
    I wrote a program to compile a simple text program to a compiled executable... Is it possible that I can load an executable to memory an some how point a pc counter to the memory space at will? Here is what I made that I would like to store the programs to memory for execution on demand... Kind of wanting to make a little web language like php but compile it... Just for learning. http://spiceycurry.blogspot.com/2010/05/simple-compilable-programming-language.html

    Read the article

  • How can I figure out a users postal code if I have their latitude / longitude location? Need help w

    - by mike
    I'm using HTML5 geolocation to collect the users lat / long and I need to figure out what their postal code is as well. I have a database of all the lat / long for each postal code in the US & Canada. How can I write a query to find out what their postal code is? Below, is an example of how the data is structured in the 'zips' table. Country PostalCode Latitude Longitude USA 0051 40.813078 -73.046388 USA 00616 18.426456 -66.673779 I can't do a 'SELECT PostalCode FROM zips WHERE Latitude = user.lat AND Longitude = user.long'. I believe I need to find the nearest lat / long. Any suggestions on how I can write this?

    Read the article

  • Ant Exec environment var

    - by Mike
    I have a problem where I don't want to have to call a setEnv.sh file before i call my ant target that calls an exec task. Right now I have a way to save the environment variables in setenv.properties file in the key=value notation. The exec task for some reason does not see the variables that are set in the .properties file.... (I know i could use the tag but the setenv.properties is dynamically generated) setenv.properties: HELLO=XYZ part of my build.xml : <property file="setenv.properties"/> <target name="test" depends="setEnv"> <exec executable="/bin/ksh" newenvironment="false"> test.sh : echo ${HELLO} Any thoughts?

    Read the article

  • innerHTML yielding undefined, but correct data is visible

    - by Mike Dyer
    var Model,node; document.getElementById('sedans').innerHTML=''; var thismodelabbr,prevmodelabbr; for(var j=0; j<xmlDoc.getElementsByTagName('data').length; j++){ node = xmlDoc.getElementsByTagName('data')[j]; thismodelabbr=node.getAttribute('model'); if(prevmodelabbr!=thismodelabbr){ Model+='<a href="">'+ node.getAttribute('model')+'</a>'; } prevmodelabbr=thismodelabbr; document.getElementById('sedans').innerHTML=Model; } The above javascript snippet is working correctly and as needed, but I'm getting an "Undefined" response before the entry is displayed within its respective page. I'm assuming it has to do with the .innerHTML call. Any insight would be deeply appreciated.

    Read the article

  • Pattern for version-specific implementations of a Java class

    - by Mike Monkiewicz
    So here's my conundrum. I am programming a tool that needs to work on old versions of our application. I have the code to the application, but can not alter any of the classes. To pull information out of our database, I have a DTO of sorts that is populated by Hibernate. It consumes a data object for version 1.0 of our app, cleverly named DataObject. Below is the DTO class. public class MyDTO { private MyWrapperClass wrapper; public MyDTO(DataObject data) { wrapper = new MyWrapperClass(data); } } The DTO is instantiated through a Hibernate query as follows: select new com.foo.bar.MyDTO(t1.data) from mytable t1 Now, a little logic is needed on top of the data object, so I made a wrapper class for it. Note the DTO stores an instance of the wrapper class, not the original data object. public class MyWrapperClass { private DataObject data; public MyWrapperClass(DataObject data) { this.data = data; } public String doSomethingImportant() { ... version-specific logic ... } } This works well until I need to work on version 2.0 of our application. Now DataObject in the two versions are very similar, but not the same. This resulted in different sub classes of MyWrapperClass, which implement their own version-specific doSomethingImportant(). Still doing okay. But how does myDTO instantiate the appropriate version-specific MyWrapperClass? Hibernate is in turn instantiating MyDTO, so it's not like I can @Autowire a dependency in Spring. I would love to reuse MyDTO (and my dozens of other DTOs) for both versions of the tool, without having to duplicate the class. Don't repeat yourself, and all that. I'm sure there's a very simple pattern I'm missing that would help this. Any suggestions?

    Read the article

  • jQuery: Execute function after all ajax .load() requests are finished

    - by Mike
    I have a page that has a tab set. Each of the tabs is loaded by the jQuery .load() function. I want to display a loading animation that disappears when all of the ajax requests are finished. However, document.ready() has only provided me with limited success. How can I ensure that all ajax requests are completed before executing the code to hide the loading animation? Thanks!

    Read the article

  • C# Combining lines

    - by Mike
    Hey everybody, this is what I have going on. I have two text files. Umm lets call one A.txt and B.txt. A.txt is a config file that contains a bunch of folder names, only 1 listing per folder. B.txt is a directory listing that contains folders names and sizes. But B contains a bunch of listing not just 1 entry. What I need is if B, contains A. Take all lines in B that contain A and write it out as A|B|B|B ect.... So example: A.txt: Apple Orange Pear XBSj HEROE B.txt: Apple|3123123 Apple|3434 Orange|99999999 Orange|1234544 Pear|11 Pear|12 XBSJ|43949 XBSJ|43933 Result.txt: Apple|3123123|3434 Orange|99999999|1234544 Pear|11|12 XBSJ|43949|43933 This is what I had but it's not really doing what I needed. string[] combineconfig = File.ReadAllLines(@"C:\a.txt"); foreach (string ccline in combineconfig) { string[] readlines = File.ReadAllLines(@"C:\b.txt"); if (readlines.Contains(ccline)) { foreach (string rdlines in readlines) { string[] pslines = rdlines.Split('|'); File.AppendAllText(@"C:\result.txt", ccline + '|' + pslines[0]); } } I know realize it's not going to find the first "if" because it reads the entire line and cant find it. But i still believe my output file will not contain what I need.

    Read the article

  • Facebook Connect in Silverlight

    - by Mike Pateras
    Is there a good way to get Facebook Connect onto a Silverlight page? All I really need is simple authorization/registration. I've looked into the facebook developer toolkit, but the documentation is more or less non-existent for Silverlight, and I didn't really get anywhere with it. Is there a good tutorial or a working library for adding Facebook Connect into a Silverlight app? Or is the best way to run Silverlight in Windowwless mode with HTML overlayed on top?

    Read the article

  • Storing XML in SQL 2005 XMLNS issue

    - by Mike Mengell
    I'm trying to store XML in SQL 2005. I have a very simple table with an Id and a XML column. When the XML contains the attribute xmlns my searching doesn't work. This is my XML; insert into XMLTest (ItemXML) values ( '<MessageType> <ItemId id="ABC" xmlns="ss" /> <Subject>sub</Subject> </MessageType> ') And this is my Query; select itemid, ItemXML.query('(/MessageType/ItemId)') from XMLTest order by ItemId desc If I change the attribute xmlns to anything else my query works. I don't think I know enough about XML to understand what SQL is doing with the namespace. But it must be processing it and storing it differently maybe? Anyone had this issue?

    Read the article

  • Chrome Javascript

    - by Mike
    i have two spans on my page with class='hidden' and then some javascript to remove the class when a condition is met, its working fine in ie 9/10 and firefox but its not working in chrome when I run the function in the chrome JS console I get the message TypeError: Cannot read property 'attributes' of null Anybody know whats going on? <script type='text/javascript' > function showhidden() { var att =document.getElementById('hiddentextbox'); att.attributes[0].value=''; att =document.getElementById('hiddentextbox1'); att.attributes[0].value=''; }</script> Thanks

    Read the article

  • Why do Scala maps have poor performance relative to Java?

    - by Mike Hanafey
    I am working on a Scala app that consumes large amounts of CPU time, so performance matters. The prototype of the system was written in Python, and performance was unacceptable. The application does a lot with inserting and manipulating data in maps. Rex Kerr's Thyme was used to look at the performance of updating and retrieving data from maps. Basically "n" random Ints were stored in maps, and retrieved from the maps, with the time relative to java.util.HashMap used as a reference. The full results for a range of "n" are here. Sample (n=100,000) performance relative to java, smaller is worse: Update Read Mutable 16.06% 76.51% Immutable 31.30% 20.68% I do not understand why the scala immutable map beats the scala mutable map in update performance. Using the sizeHint on the mutable map does not help (it appears to be ignored in the tested implementation, 2.10.3). Even more surprisingly the immutable read performance is worse than the mutable read performance, more significantly so with larger maps. The update performance of the scala mutable map is surprisingly bad, relative to both scala immutable and plain Java. What is the explanation?

    Read the article

  • R: how to make a unique set of names from a vector of strings?

    - by Mike Dewar
    Hi, I have a vector of strings. Check out my vector, it's awesome: > awesome [1] "a" "b" "c" "d" "d" "e" "f" "f" I'd like to make a new vector that is the same length as awesome but where, if necessary, the strings have been uniqueified. For example, a valid output of my desired function would be > awesome.uniqueified [1] "a" "b" "c" "d.1" "d.2" "e" "f.1" "f.2" Is there an easy, R-thonic and beautiful way to do this? I should say my list in real life (it's not called awesome) contains 25000ish mircoarray probeset identifiers. I'm always nervous when I embark on writing little generic functions (which I'm sure I could do) as I'm sure some R guru has come across this problem in the past, nailed it with some incredible algorithm that doesn't even have to store more than half an element in the vector. I'm just not sure what they might have called it. Probably not uniqueify.

    Read the article

  • PHP: Manage roles with math?

    - by Mike
    I once saw an article about how to use a specific type of numbering system to manage roles. A user would be assigned a specific role number and depending on a calculation, the number could stand for multiple roles. Can anybody share this technique with me or share a link? Thanks!

    Read the article

  • Setting a preferred item of a many-to-one in Django

    - by Mike DeSimone
    I'm trying to create a Django model that handles the following: An Item can have several Names. One of the Names for an Item is its primary Name, i.e. the Name displayed given an Item. (The model names were changed to protect the innocent.) The models.py I've got looks like: class Item(models.Model): primaryName = models.OneToOneField("Name", verbose_name="Primary Name", related_name="_unused") def __unicode__(self): return self.primaryName.name class Name(models.Model): item = models.ForeignKey(Item) name = models.CharField(max_length=32, unique=True) def __unicode__(self): return self.name class Meta: ordering = [ 'name' ] The admin.py looks like: class NameInline(admin.TabularInline): model = Name class ItemAdmin(admin.ModelAdmin): inlines = [ NameInline ] admin.site.register(Item, ItemAdmin) It looks like the database schema is working fine, but I'm having trouble with the admin, so I'm not sure of anything at this point. My main questions are: How do I explain to the admin that primaryName needs to be one of the Names of the item being edited? Is there a way to automatically set primaryName to the first Name found, if primaryName is not set, since I'm using inline admin for the names?

    Read the article

  • CSS of iFramed page not being applied properly

    - by Mike E.
    My company has purchased a third-party package with a built-in customer facing web portal, and I'm being tasked with integrating it into our site. Unfortunately, the web portal does not look great, and we have absolutely no control over how it looks (other than asking the vendor for changes - $$). In order to make it look somewhat like the rest of our site, I've stuck it in an iFrame (I'm not thrilled about this either) to put our logo and top navigation on it. Please note, I am not attempting to manipulate the iframed page in any way. Firefox handles this just fine, but in IE7 and IE8, not all of the CSS is being applied properly when the application's pages are displayed in the iFrame. Specifically, it should be applying a font-family of Arial to all TDs, but some text inside TDs are not being displayed as Arial. Any ideas as to what is going on? This only happens when the pages are viewed inside the iFrame. Outside the iFrame, the CSS is applied as it should be. I'm guessing we're going to have to get our vendor to make some changes, but I'd love to know why the iFrame is impacting the page like this. Thanks!

    Read the article

  • php $_POST array empty upon form submission...

    - by Mike D
    Hi folks, I'm baffled on this after much googling. This issue is simple, I have a custom CMS i've built that works perfectly on my dev box (Ubuntu/PHP5+/MySQL5+). I just moved it up to the production box for my client and now all form submissions are showing up as empty $_POST arrays. I found a trick to verify the data is actually being passed using "file_get_contents('php://input');" and the data is showing up fine there -- the $_POST/$_REQUEST arrays are always empty. I've also verified the content-type headers are correct as well via firebug (application/x-www-form-urlencoded; charset=utf-8). This issue is happening regardless of whether a form is submitting via AJAX or a regular form submit. Any help is greatly appreciated!

    Read the article

  • "Invalid use of Null" when using Str() with a Null Recordset field, but Str(Null) works fine

    - by Mike Spross
    I'm banging my head against the wall on this one. I was looking at some old database reporting code written in VB6 and case across this line (the code is moving data from a "source" database into a reporting database): rsTarget!VehYear = Trim(Str(rsSource!VehYear)) When rsSource!VehYear is Null, the above line generates an "Invalid use of Null" run-time error. If I break on the above line and type the following in the Immediate pane: ?rsSource!VehYear It outputs Null. Fine, that makes sense. Next, I try to reproduce the error: ?Str(rsSource!VehYear) I get an "Invalid use of Null" error. However, if I type the following into the Immediate window: ?Str(Null) I don't get an error. It simply outputs Null. If I repeat the same experiment with Trim() instead of Str(), everything works fine. ?Trim(rsSource!VehYear) returns Null, as does ?Trim(Null). No run-time errors. So, my question is, how can Str(rsSource!VehYear) possibly throw an "Invalid use of Null" error when Str(Null) does not, when I know that rsSource!VehYear is equal to Null?

    Read the article

  • Convert integer to equivalent number of blank spaces.

    - by mike
    I was wondering what the easiest way is to convert an integer to the equivalent number of blank spaces. I need it for the spaces between nodes when printing a binary search tree. I tried this `int position = printNode.getPosition(); String formatter = "%1"+position+"s%2$s\n"; System.out.format(formatter, "", node.element);` But I am getting almost 3 times as many spaces compared to the int value of position. I'm not really sure if I am formatting the string right either. Any suggestions would be great! If it makes it clearer, say position = 6; I want 6 blank spaces printed before my node element.

    Read the article

  • J2SE Client Server App: Client calls RMI method. Server handles RMI method and returns, but Client

    - by Mike
    J2SE Client Server App: Client calls RMI message. Server handles RMI method and returns, but Client never receives it. Any ideas how this could happen? Our attempted solution is to set client read timeouts and come up with a framework for resending requests or otherwise handling those failures gracefully. But really, I'd like to know any root causes for how this might happen rather than addressing the symptoms.

    Read the article

  • iPhone: Waiting until selectrow animation finishes before pushing viewcontroller?

    - by Mike
    My code looks like this: NSIndexPath *ip = [NSIndexPath indexPathForRow:15 inSection:0]; [[self tableView] selectRowAtIndexPath:ip animated:YES scrollPosition:UITableViewScrollPositionMiddle]; // Pause needed here until animation finishes [[self navigationController] pushViewController:secondView animated:YES]; Right now it animates the scroll/selection of the row and pushes the view controller at the same time. What I would like it to do is wait until it finishes the scroll/selection and then push the view controller. Is there any possible way of doing this? Thanks

    Read the article

  • Stubborn UIButton

    - by Mike
    I have a UIButton that is supposed to be disabled during certain phases. So, when this happens I do [myButton setEnabled:NO]; This is perfect because the button stays grayed and if clicked will not trigger its action, but... when the button is clicked even grayed, it enables again and a second click will trigger its actions (???????!!!!!!!!!!). How can that be? If the button is disabled it is supposed to be "part of the background", i.e., an image without any action. I have tried to make the button vanish using alpha but even if you click on the empty spot, it reappears after the first click and then can trigger actions after the second click... (????) Am I missing something?

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >