Search Results

Search found 3022 results on 121 pages for 'loose typing'.

Page 81/121 | < Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >

  • How to implement buffering with timeout in RX

    - by Gaspar Nagy
    I need to implement an event processing, that is done delayed when there are no new events arriving for a certain period. (I have to queue up a parsing task when the text buffer changed, but I don't want to start the parsing when the user is still typing.) I'm new in RX, but as far as I see, I would need a combination of BufferWithTime and the Timeout methods. I imagine this to be working like this: it buffers the events until they are received regularly within a specified time period between the subsequent events. If there is a gap in the event flow (longer than the timespan) it should return propagate the events buffered so far. Having a look at how Buffer and Timeout is implemented, I could probably implement my BufferWithTimeout method (if everyone have one, please share with me), but I wonder if this can be achieved just by combining the existing methods. Any ideas?

    Read the article

  • the commands ls and get of ftp are not working in vmware

    - by mnish
    Hi, Iam using vmware player version 3.1 to boot a minix 3 os image. After booting the minix os I want to get some files from a server using ftp. the ftp connection to the server works but when i use the commands "ls" or "get" nothing happens except it says "200 PORT command successful" and it hanges in there. The only thing i can do after typing ls+enter or get+enter is to exit the ftp by using ctrl+c. If anyone knows a solution to this? please help. Thank you

    Read the article

  • [jscript] Good (better) substition for setInterval or setTimeout

    - by riffnl
    I've got a masterpage with some nice UI (jQuery) features. One of these options is interefering with my embedded YouTube (or other alike-) objects. On each, in this case, setInterval event the embedded video stops displaying new frames (for like a second). More detail: I've got a "polaroid" gallery (in the header) with only 5 100x100 images in it (test: preloading has no effect on performance) and my gallery will show or hide them (fade-in / fade-out) after a period of time. (test: non-animated display:hide or display:block has no effect on performance). After some testing and I've come to the conclusion that it isn't the "animated" showing or hiding of the pictures, but it's the interval itself (- since altering to display:hide or block had the same result). Perhaps it is my "gallery" "function" on itself ... function poladroid() { if (!galleryHasFocus) { if (galleryMax >= 0) { galleryCurrent++; if (galleryCurrent > galleryMax) { galleryCurrent = 0; showPictures = !showPictures; } if (showPictures) { $('#pic-' + galleryCurrent.toString()).show("slow"); } else { $('#pic-' + galleryCurrent.toString()).hide("slow"); } } } if (!intervalSet) { window.setInterval("poladroid()", 3000); intervalSet = true; } } It's not like my function is doing really awkward stuff is it? So, I was thinking I needed a more "loose" interval function.. but is there an option for it?

    Read the article

  • How does Twitter for iPhone bookmarklet work?

    - by Igor Zevaka
    Twitter client (formerly Tweetie) allows you to define a bookmarklet in Safari that launches the app. I want to know which iPhone API allows you to register the protocol specifier (or whatever it's called) - in this case "tweetie:" - in order for this bookmarklet to work. The instructions can be found here and the bookmarklet itself is below. javascript:window.location='tweetie:'+window.location Clicking the above bookmark is the same as typing in "tweetie:http://google.com" into the address bar. This is obviously supported on the OS/Browser level, much the same as tel: URIs. Am I correct in understanding that developers can add arbitrary URI protocol specifiers as a part of app installation?

    Read the article

  • scala REPL is slow on vista

    - by Jacques René Mesrine
    I installed scala-2.8.0.RC3 by extracting the tgz file into my cygwin (vista) home directory. I made sure to set $PATH to scala-2.8.0.RC3/bin. I start the REPL by typing: $ scala Welcome to Scala version 2.8.0.RC3 (Java HotSpot(TM) Client VM, Java 1.6.0_20). Type in expressions to have them evaluated. Type :help for more information. scala> Now when I tried to enter an expression scala> 1 + 'a' the cursor hangs there without any response. Granted that I have chrome open with a million tabs and VLC playing in the background, but CPU utilization was 12% and virtual memory was about 75% utilized. What's going on ? Do I have to set the CLASSPATH or perform other steps.

    Read the article

  • [Delphi] How would you refactor this code?

    - by Al C
    This hypothetical example illustrates several problems I can't seem to get past, even though I keep trying!! ... Suppose the original code is a long event handler, coded in the UI, triggered when a user clicks a cell in a grid. Expressed as pseudocode it's: if Condition1=true then begin //loop through every cell in row, //if aCell/headerCellValue>1 then //color aCell red end else if Condition2=true then begin //do some other calculation adding cell and headerCell values, and //if some other product>2 then //color the whole row green end else show an error message I look at this and say "Ah, refactor to the strategy pattern! The code will be easier to understand, easier to debug, and easier to later extend!" I get that. And I can easily break the code into multiple procedures. The problem is ultimately scope related. Assume the pseudocode makes extensive use of grid properties, values displayed in cells, maybe even built-in grid methods. How do you move all that to another unit, without referencing the grid component in the UI--which would break all the "rules" about loose coupling that make OOP valuable? ... I'm really looking forward to responses. Thanks, as always -- Al C.

    Read the article

  • What features of interpreted languages can a compiled one not have?

    - by sub
    Interpreted languages are usually more high-level and therefore have features as dynamic typing (including creating new variables dynamically without declaration), the infamous eval and many many other features that make a programmer's life easier - but why can't compiled languages have these as well? I don't mean languages like Java that run on a VM, but those that compile to binary like C(++). I'm not going to make a list now but if you are going to ask which features I mean, please look into what PHP, Python, Ruby etc. have to offer. Which common features of interpreted languages can't/don't/do exist in compiled languages? Why?

    Read the article

  • How can I debug this web service http handler?

    - by baron
    Hello everyone, I am building a Httphandler following these instructions here It manipulates HTTP POST and HTTP GET. I have a client with two buttons two POST and GET. After i've tested and happy everythings working I move it from localhost to IIS. Now when I do this I get an exception in the POST handler code. How on earth can I debug this code line by line? I managed to do this awhile ago, I thought it was by attaching to process but I can't work it out. I can emulate GET just by typing address in browser, post im not sure about. I've tried telnetting and sending it from there but haven't had any luck.

    Read the article

  • Xcode, Dev Docs Search Field Loosing Focus?

    - by fuzzygoat
    I am having a strange issue with the developer documentation (which i have only noticed after installing Xcode 3.2.3). My problem is that as you type in the search field (upper right) it looses focus and immediately starts looking for the first few letters you type. For example if you looking for "NSObject" you start typing "NSO" and as you type the field looses focus the last 5 characters "bject" just give beeps as you need to reselect the field to type extra characters. Has anyone else come across this or know what the problem might be? cheers Gary.

    Read the article

  • Limiting input to specified regexp with uppercase chars in IE

    - by pixelboy
    I'm trying to limit what our users will be able to type in inputs, using javascript/jquery. Problem is, I have to limit this to Uppercase chars only, and numbers. Here's what I coded previously : $(input).keydown(function(e){ if ($(input).attr("class")=="populationReference"){ var ValidPattern = /^[A-Z_0-9]*$/; var char = String.fromCharCode(e.charCode); if (!ValidPattern.test(char) && e.charCode!=0){ return false; e.preventDefault(); } } }); If Firefox supports charCode, IE doesn't. How then, could I test if the user is typing uppercase or lowercase characters ? Thanks for any help !

    Read the article

  • loading files in prolog

    - by cubearth
    hey guys, am a bit of a newbie in Prolog. And am going thru this tutorial on line and it is telling me i can load other prolog files by typing: [filename]. but ever time I try this am getting ERROR: load_files/2: Arguments are not sufficiently instantiated. What am i doing wrong? P.S. the file is in the same directory as the one am working in. and here is a copy of the entire query and error. 12 ?- [KB5]. ERROR: load_files/2: Arguments are not sufficiently instantiated

    Read the article

  • Condensing multiple else if statements, referencing them from a table?

    - by Haskella
    Hi I'm about to type some 500 else if statements into my code (PHP) which have the exact same coding each: if (color=White); rgb = 255-255-255; print rgb; else if (color=Black); rgb = 0-0-0; print rgb; else if (color=Red); rgb = 255-0-0; print rgb; else if (color=Blue); rgb = 0-0-255; print rgb; [the list keeps going] I also (luckily) have a table that displays the color in the first column and rgb value in the next column for 500 of them... how do I use this to save time typing all those else if statements? Some how I have to reference the table file (made in excel, I'm guessing I'll have to save it as .csv?)

    Read the article

  • jquery autocomplete on button click get hidden value

    - by gabriel
    using jquery autocomplete, we get hidden value by calling .result function like this $("#suggest").result(function(event, data, formatted) { $('#hidden').val(data[1]); }); This is only useful when we selected the option from autosuggest list and press enter. What i need is that i enter the option by typing the complete word without selecting it and clicking on Ok button? but i am always getting empty. <input type="text" id="suggest" /> <input type="button" value="Ok" onclick="GetValue()" /> <input type="hidden" id="hidden"/> function GetValue() { //get hidden field value - getting empty var hid=document.getElementById('hidden').value; }

    Read the article

  • Starting an Intent to Launch an app to Background in Android

    - by Tista
    Hi all, I'm using Wikitude API 1.1 as an AR viewer in my application. The problem with Wikitude, if I haven't launched the actual Wikitude application since the phone's bootup, I will get a NullPointerException everytime I start my own application. So I figure if I can start my app first and them check if Wikitude is installed and or running. If it's not installed, go to market n download. If it's not running, then we should run it straight to background so that my app doesn't loose its focus. // Workaround for Wikitude this.WIKITUDE_PACKAGE_NAME = "com.wikitude"; PackageManager pacMan = Poligamy.this.getPackageManager(); try { PackageInfo pacInfo = pacMan.getPackageInfo(this.WIKITUDE_PACKAGE_NAME, pacMan.GET_SERVICES); Log.i("CheckWKTD", "Wikitude is Installed"); ActivityManager aMan = (ActivityManager) this.getSystemService(ACTIVITY_SERVICE); List<RunningAppProcessInfo> runningApps = aMan.getRunningAppProcesses(); int numberOfApps = runningApps.size(); for(int i=0; i<numberOfApps; i++) { if(runningApps.get(i).processName.equals(this.WIKITUDE_PACKAGE_NAME)) { this.WIKITUDE_RUNNING = 1; Log.i("CheckWKTD", "Wikitude is Running"); } } if(this.WIKITUDE_RUNNING == 0) { Log.i("CheckWKTD", "Wikitude is NOT Running"); /*final Intent wIntent = new Intent(Intent.ACTION_MAIN, null); wIntent.addCategory(Intent.CATEGORY_LAUNCHER); final ComponentName cn = new ComponentName("com.wikitude", "com.mobilizy.wikitudepremium.initial.Splash"); wIntent.setComponent(cn); wIntent.setFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION); startActivityIfNeeded(wIntent, 0);*/ } } catch (NameNotFoundException e) { // TODO Auto-generated catch block Log.i("CheckWKTD", "Wikitude is NOT Installed"); e.printStackTrace(); //finish(); } The part I block commented is the intent to start Wikitude. But I always failed in restricting Wikitude to background. Any help? Thanks before. Best, Tista

    Read the article

  • How to get repository for core-plot

    - by Omar
    I am not able to get the repository for core-plot. What I am doing is that I am typing this in the terminal: hg clone https://core-plot.googlecode.com/hg/ core-plot and this is what I get: Traceback (most recent call last): File "/usr/local/bin/hg", line 25, in mercurial.util.set_binary(fp) File "/Library/Python/2.5/site-packages/mercurial/demandimport.py", line 75, in __getattribute__ self._load() File "/Library/Python/2.5/site-packages/mercurial/demandimport.py", line 47, in _load mod = _origimport(head, globals, locals) File "/Library/Python/2.5/site-packages/mercurial/util.py", line 93, in _encoding = locale.getlocale()[1] File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py", line 460, in getlocale return _parse_localename(localename) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py", line 373, in _parse_localename raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: UTF-8 I can't seem to get it to install. Please give me guidance on how to install the repository.

    Read the article

  • SQL Server: bcp utility: login fails

    - by Patrick
    Microsoft Windows [Version 5.2.3790] (C) Copyright 1985-2003 Microsoft Corp. C:\Documents and Settings\Administrator>bcp "SELECT TOP 1000 * FROM SOData.dbo.E xperts" queryout c:\customer3.txt -n -t -UAdministrator -P -SDNAWINDEV SQLState = 28000, NativeError = 18456 Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for u ser 'Administrator'. or.. without -P flag C:\Documents and Settings\Administrator>bcp "SELECT TOP 1000 * FROM SOData.dbo.E xperts" queryout c:\customer3.txt -n -t -UAdministrator -P -SDNAWINDEV SQLState = 28000, NativeError = 18456 Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for u ser 'Administrator'. or, without -P flag, and typing the password.. is the same C:\Documents and Settings\Administrator>bcp "SELECT TOP 1000 * FROM SOData.dbo.E xperts" queryout c:\customer3.txt -n -t -UAdministrator -SDNAWINDEV Password: SQLState = 28000, NativeError = 18456 Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for u ser 'Administrator'.

    Read the article

  • What is the difference between these task definition syntaxes in gradle?

    - by bergyman
    A) task build << { description = "Build task." ant.echo('build') } B) task build { description = "Build task." ant.echo('build') } I notice that with type B, the code within the task seems to be executed when typing gradle -t - ant echoes out 'build' even when just listing all the various available tasks. The description is also actually displayed with type B. However, with type A no code is executed when listing out the available tasks, and the description is not displayed when executing gradle -t. The docs don't seem to go into the difference between these two syntaxes (that I've found), only that you can define a task either way.

    Read the article

  • RewriteCond to change displayed host, but not server

    - by coneybeare
    Typing out the title to this leads me to believe this might not be possible due to security concerns, but I will ask anyway. I have shortcode support running on my server, lets call it xx.yy I want it so when a user sends a request to xx.yy, it just changes the displayed host to another valid domain running on the same box. I have this so far (lets the server know to accept requests from xx.yy): RewriteCond %{HTTP_HOST} ^.*xx.yy [NC] RewriteRule ^/(.*)$ http://127.0.0.1:<PORT_OMITTED>%{REQUEST_URI} [P,QSA,L] RewriteCond %{HTTP_HOST} ^.*mysite.com [NC] RewriteRule ^/(.*)$ http://127.0.0.1:<PORT_OMITTED>%{REQUEST_URI} [P,QSA,L] It works, and it directs the traffic into my app, but the url says http://xx.yy when I would rather it say http://mysite.com I know i could redirect to http://mysite.com instead of 127.0.0.1, but I have 4 parallel boxes of mysite.com and going back out to DNS to maybe go to another box seems like a waste when I am already here. Also, I am not sure how POST requests would work like that. What can I do?

    Read the article

  • Static Property losing its value intermittently ?

    - by joedotnot
    Is there something fundamentally wrong with the following design, or can anyone see why would the static properties sometimes loose their values ? I have a class library project containing a class AppConfig; this class is consumed by a Webforms project. The skeleton of AppConfig class is as follows: Public Class AppConfig Implements IConfigurationSectionHandler Private Const C_KEY1 As String = "WebConfig.Key.1" Private Const C_KEY2 As String = "WebConfig.Key.2" Private Const C_KEY1_DEFAULT_VALUE as string = "Key1defaultVal" Private Const C_KEY2_DEFAULT_VALUE as string = "Key2defaultVal" Private Shared m_field1 As String Private Shared m_field2 As String Public Shared ReadOnly Property ConfigValue1() As String Get ConfigValue1= m_field1 End Get End Property Public Shared ReadOnly Property ConfigValue2() As String Get ConfigValue2 = m_field2 End Get End Property Public Shared Sub OnApplicationStart() m_field1 = ReadSetting(C_KEY1, C_KEY1_DEFAULT_VALUE) m_field2 = ReadSetting(C_KEY2, C_KEY1_DEFAULT_VALUE) End Sub Public Overloads Shared Function ReadSetting(ByVal key As String, ByVal defaultValue As String) As String Try Dim setting As String = System.Configuration.ConfigurationManager.AppSettings(key) If setting Is Nothing Then ReadSetting = defaultValue Else ReadSetting = setting End If Catch ReadSetting = defaultValue End Try End Function Public Function Create(ByVal parent As Object, ByVal configContext As Object, ByVal section As System.Xml.XmlNode) As Object Implements System.Configuration.IConfigurationSectionHandler.Create Dim objSettings As NameValueCollection Dim objHandler As NameValueSectionHandler objHandler = New NameValueSectionHandler objSettings = CType(objHandler.Create(parent, configContext, section), NameValueCollection) Return 1 End Function End Class The Static Properties get set once on application start, from the Application_Start event of the Global.asax Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) //Fires when the application is started AppConfig.OnApplicationStart() End Sub Thereafter, whenever we want to access a value in the Web.Config from anywhere, e.g. aspx page code-behind or another class or referenced class, we simply call the static property. For example, AppConfig.ConfigValue1() AppConfig.ConfigValue2() This is turn returns the value stored in the static backing fields m_field1, m_field2 Problem is sometimes these values are empty string, when clearly the Web.Config entry has values. Is there something fundamentally wrong with the above design, or is it reasonable to expect the static properties would keep their value for the life of the Application session?

    Read the article

  • Is it possible to register a user and submit a comment with one form with Wordpress?

    - by zack
    Is it possible to do both registering for an account and submit a comment at the same time? I want the user to be able to do this all on one page to ecourage the registration rather than be discouraged about typing something, not realizing they had to be registered and thus having to leave the page. I think that this could be done by adding register user action to the submit comment action, but not sure how to do it with the prebuilt wordpress add_action or do_action functions. Has anyone tried this, or know of any plug-ins that do this already? I searched but couldn't find anything helpful. Thanks.

    Read the article

  • problem installing rails3.0

    - by Themasterhimself
    Tried the link http://railscasts.com/episodes/200-rails-3-beta-and-rvm gokul@gokul-laptop:~$ ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux] gokul@gokul-laptop:~$ mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/ && git clone git://github.com/wayneeseguin/rvm.git && cd rvm && ./install The program 'git' is currently not installed. You can install it by typing: sudo apt-get install git-core git: command not found gokul@gokul-laptop:~/.rvm/src$ sudo apt-get install git-core [sudo] password for gokul: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? gokul@gokul-laptop:~/.rvm/src$ anyone?

    Read the article

  • a simple secenerio to implement java script asp.net C#, question rephrased

    - by user287745
    i had asked this question before but got no answer correct. so, this is a simple thing textbox.text='user typing'; button:-store the value to a variable and a database. very simple nothing to it but there should be no post back, that is the page must not load again, try ajax? tried it not working i must a lot of time trying to implement this using java script ajax and read many many post, but for some reason i cannot implement the functionality correctly. please help. thank you

    Read the article

  • CakePHP Routes: Messing With The MVC

    - by thesunneversets
    So we have a real-estate-related site that has controller/action pairs like "homes/view", "realtors/edit", and so forth. From on high it has been deemed a good idea to refactor the site so that URLS are now in the format "/realtorname/homes/view/id", and perhaps also "/admin/homes/view/id" and/or "/region/..." As a mere CakePHP novice I'm finding it difficult to achieve this in routes.php. I can do the likes of: Router::connect('/:filter/h/:id', array('controller'=>'homes','action'=>'view')); Router::connect('/admin/:controller/:action/:id'); But I'm finding that the id is no longer being passed simply and elegantly to the actions, now that controller and action do not directly follow the domain. Therefore, questions: Is it a stupid idea to play fast and loose with the /controller/action format in this way? Is there a better way of stating these routes so that things don't break egregiously? Would we be better off going back to subdomains (the initial method of achieving this type of functionality, shot down on potentially spurious SEO-related grounds)? Many thanks for any advice! I'm sorry that I'm such a newbie that I don't know whether I'm asking stupid questions or not....

    Read the article

  • Are the built-in images in iPhone documented, and is there a list of their names somewhere?

    - by Alex Gosselin
    I discovered somewhat by accident that if you make a UIButton in Interface Builder and type in Plus in the image field, a + image appears for the button. A similar result comes from typing Minus. I am wondering if this is a bug, or if there is some way the poor programmers can access the built-in general GUI images from other apple apps, such as the green +, the red -, the detail disclosure chevron, the big red "Delete Contact" or similarly styled button, etc. Has anyone else encountered this, or know where to access these things in Xcode? It makes sense to me that they should be usable, cause the Apple HIG seems to be all about making things recognizable and intuitive, and using them the way other apps use them.

    Read the article

  • C: Pointers to any type?

    - by dragme
    I hear that C isn't so type-safe and I think that I could use that as an advantage for my current project. I'm designing an interpreter with the goal for the VM to be extremely fast, much faster than Ruby and Python, for example. Now I know that premature optimization "is the root of all evil" but this is rather a conceptual problem. I have to use some sort of struct to represent all values in my language (from number over string to list and map) Would the following be possible? struct Value { ValueType type; void* value; } I would store the actual values elsewhere, e.g: a separate array for strings and integers, value* would then point to some member in this table. I would always know the type of the value via the type variable, so there wouldn't be any problems with type errors. Now: Is this even possible in terms of syntax and typing?

    Read the article

< Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >