Search Results

Search found 14236 results on 570 pages for 'times square'.

Page 214/570 | < Previous Page | 210 211 212 213 214 215 216 217 218 219 220 221  | Next Page >

  • Is the "lock" statement in C# time-consuming?

    - by markattwood
    I have a method which has been called many times by other methods to hash data. Inside the method, some lock statements are used. Could you please let me know whether the lock statement is time-consuming and what is the best way to improve it. P/S: I have been finding a way to avoid using the lock statement in this method.

    Read the article

  • Is there a way to wrap some local cache around a URLConnection

    - by Michael Neale
    I am using a URLConnection class - I want to be able to grab a stream to a given URL even if said URL is unavailable (ie cache the last known cope of the content on a URL, to some local file system dir) - now I have written this code a few times (never happy with it) and was wondering if there is something better out there that might be able to do this.

    Read the article

  • Is there an equivalent to RSpec's before(:all) in MiniTest?

    - by bergyman
    Since it now seems to have replaced TestUnit in 1.9.1, I can't seem to find an equivalent to this. There ARE times when you really just want a method to run once for the suite of tests. For now I've resorted to some lovely hackery along the lines of: Class ParseStandardWindTest < MiniTest::Unit::TestCase @@reader ||= PolicyDataReader.new(Time.now) @@data ||= @@reader.parse def test_stuff transaction = @@data[:transaction] assert true, transaction end end

    Read the article

  • order keywords by frequency in PHP mySql

    - by Gusepo
    Hello, I've got a database with video ids and N keywords for each video. I made a table with 1 video ID and 1 keyword ID in each row. What's the easiest way to order keywords by frequency? I mean to extract the number of times a keyword is used and order them. Is it possible to do that with sql or do I need to use php arrays? Thanks

    Read the article

  • What's the smallest DirectX installer I can distribute in my Software?

    - by John
    My application uses DirectX 9.0c. There are many installers for the end-user run-times, ranging from 400Kb to 100Mb+ and obviously I don't want to bloat my installer file. However, I believe there are potentially legal restrictions which mean I can't just distribute whichever MS installers I might choose. This is the one I'd ideally like to include, is it the best /correct one?

    Read the article

  • Number of elements in Python Set

    - by Tim
    I have a list of phone numbers that have been dialed (nums_dialed). I also have a set of phone numbers which are the number in a client's office (client_nums) How do I efficiently figure out how many times I've called a particular client (total) For example: >>>nums_dialed=[1,2,2,3,3] >>>client_nums=set([2,3]) >>>??? total=4 Problem is that I have a large-ish dataset: len(client_nums) ~ 10^5; and len(nums_dialed) ~10^3.

    Read the article

  • simple dividing

    - by dontoo
    Lets say I am dividing 2592 / 324 = 8 Practically I must guess that 324 goes 8 times in 2592 without reminder. For example, first I try with 7 ( 7*324 = 2268, reminder 324, so 7 is wrong, so I try with 8 and 8 is correct) Is there anyway to do dividing without guessing( trying ), like multiplication ( all mechanically, digit by digit )?

    Read the article

  • What programming shortcuts do you end up regretting or backing out?

    - by bryanjonker
    I saw this question and it reminded me of AutoGenerateColumns in the old DataGrid. The few times I've used them, I ended up backing it out because I needed data formatting past the standard "spit out the Data Source columns." Likewise, with toggle, it sounds like it would save time, but then you end up needing to keep track of state or something else, and you rewrite the code accordingly. Are there things that you end up using thinking it will save you time, but end up backing out because it doesn't do what you need?

    Read the article

  • how to organize all JQuery scripts

    - by Abu Hamzah
    i am using half dozen jquery plugins and plus my own jquery scripts and in every script i have this code: $(document).ready(function() { .... } what is the best way of organizing all the scripts in one centeralized location and instead of having multiple times $(document).ready(function() everywhere in the script. thoughts?

    Read the article

  • Synchronizing time between two Windows 7 machines connected with a LAN cable

    - by Markus Roth
    I have a number laptops that run our application while connected to each other in pairs with an ethernet cable, but not connected to any external network or the internet. T I need the connected pair to synchronize their system times, but since every computer needs to be able to synch with any other computer, I can't define one computer to be a time-server and the other to be a client. Is there a way to do this with NTP? Or some other way?

    Read the article

  • .NET object creation and generations

    - by nimoraca
    Is there a way to tell the .NET to allocate a new object in generation 2 heap. I have a problem where I need to allocate approximately 200 MB of objects, do something with them, and throw them away. What happens here is that all the data gets copied two times (from gen0 to gen1 and then from gen1 to gen2).

    Read the article

  • Symmetric Encryption: Performance Questions

    - by cam
    Does the performance of a symmetric encryption algorithm depend on the amount of data being encrypted? Suppose I have about 1000 bytes I need to send over the network rapidly, is it better to encrypt 50 bytes of data 20 times, or 1000 bytes at once? Which will be faster? Does it depend on the algorithm used? If so, what's the highest performing, most secure algorithm for amounts of data under 512 bytes?

    Read the article

  • Set Positions returns E_NOTIMPL

    - by Manish
    Hi, I want to write only a specific portion of a .avi file in the output .avi file .For this I follow Source Filter -Avi mux-File Writer.I try to use IMediaSeeking on the Mux to set the specific start and stop times using Set Positions but it returns E_NOTIMPL. I also try to query the graph builder for IMediaSeeking and try to set the start and stop positions with no success.Can someone help?

    Read the article

  • how can I count number of occurance of a word in a string while ignoring cases

    - by Ronny
    I am trying to count the number of occurance of a given word while ignoring cases. I have tried <?php $string = 'Hello World! EARTh in earth and EARth';//string to look into. if(stristr($string, 'eartH')) { echo 'Found';// this just show eartH was found. } $timesfound = substr_count($string, stristr($string, 'eartH'));// this count how many times. echo $timesfound; // this outputs 1 instead of 3.

    Read the article

  • how does Enumerable#cycle work? (ruby)

    - by Radek
    looper = (0..3).cycle 20.times { puts looper.next } can I somehow find the next of 3? I mean if I can get .next of any particular element at any given time. Not just display loop that starts with the first element. UPDATE Of course I went though ruby doc before posting my question. But I did not find answer there ...

    Read the article

  • A C# collection, which behaves like C++ set or priority_queue?

    - by Wojciech
    Hello, I have written the Dijkstra's algorithm many times in C++ - I need there set or priotity_queue, both give me possibility to add an element and find the least one (using specified comparator). Now, I've got a problem when trying to write Dijkstra in C# - is there any structure which could be useful for me? I need adding and finding or erasing the least element. Using Visual Studio '08

    Read the article

  • DoubleClick studio thinks I've imported the Enabler component in both my parent and my child asset f

    - by Marijn Huizendveld
    I've just started to work with DoubleClick Studio. I've successfully created a Flash expanding ad with CS4 that is mostly scripted and uses the Document class option. Now for some reason the back end of DoubleClick Studio thinks I've imported the Enabler component twice. I've checked my files numerous of times but can't find the root cause. Any help is much appreciated :)

    Read the article

  • Why is QuartzCore reported as leaking in my app?

    - by glutz78
    When I view my app's memory in the xcode memory tool, i see that something called QuartzCore is reported as leaking many times. Each leak ranges from 16-80 bytes. My code is not referencing this. it's all from withing UIApplicationMain(). So I'm not sure how to control this. Any ideas? Thank you.

    Read the article

  • Android SDK and AVD Manager installation

    - by iamalex
    I am new to android development. Have tried a couple times downloading the Android SDK and ADT plugin for Eclipse In the Android SDK and AVD manager load fine but will not load any available packages. Show: - Android Repository --"Some packages were found but are not compatible updates" In the installed it shows 1.5 to 2.3 SDK platforms. How to I get them available. Appreciate help. Thanks, Alex

    Read the article

  • Timezone issue in Drupal

    - by cinqoTimo
    I have a drupal site where all the views and times associated with nodes are off by 1-hour. -I checked the server time, and it is correct -I checked that my admin user (uid 1) had a zero in the timezone offset -Checked all CCK date fields in question to make sure there was no timezone handling Yet still when the admin user views nodes, there is a 1-hour offset. Is there some sort of system variable - or something else I haven't checked....?

    Read the article

  • jquery/ajax post() in a posted page

    - by haltman
    hi everybody, I have a page with a div, inside this div I load a page with a form with a select, I can get selected option by post() function but, how can I get at the same time selected option and full data option? I've tried to get full data with a post() in a click() function positioned directly on form page but it does not work, can I post 2 times on the same page(one for get selected option and one for full data option)? thanks in advance ciao, h.

    Read the article

< Previous Page | 210 211 212 213 214 215 216 217 218 219 220 221  | Next Page >