Search Results

Search found 27 results on 2 pages for 'regis frey'.

Page 1/2 | 1 2  | Next Page >

  • Licensing a JavaScript library

    - by Kendall Frey
    I am developing a free, open-source (duh) JavaScript library, and wondering how to license it. I was considering the GNU GPL, but I heard that I must distribute the license with the software, and I'm not sure anymore. I would like the library to be available much like jQuery: In a free, downloadable script, preferably in either original or minified form. Am I mistaken about the GNU GPL license terms? jQuery is dual licensed under GNU GPL or MIT licenses. How does the GPL apply to single script files like that? Can I license my library with nothing more than a few sentences in the script file? Is there another license that better suits my needs? What would be nice is a license that allows you to put the URL in the source, for people to read if they want. I don't know that many do, unless I am mistaken. I am generally looking to release the library as free software like the GPL specifies, but don't want to have to force licensees to download the full license unless they wish to read it.

    Read the article

  • Is there any functional difference between immutable value types and immutable reference types?

    - by Kendall Frey
    Value types are types which do not have an identity. When one variable is modified, other instances are not. Using Javascript syntax as an example, here is how a value type works. var foo = { a: 42 }; var bar = foo; bar.a = 0; // foo.a is still 42 Reference types are types which do have an identity. When one variable is modified, other instances are as well. Here is how a reference type works. var foo = { a: 42 }; var bar = foo; bar.a = 0; // foo.a is now 0 Note how the example uses mutatable objects to show the difference. If the objects were immutable, you couldn't do that, so that kind of testing for value/reference types doesn't work. Is there any functional difference between immutable value types and immutable reference types? Is there any algorithm that can tell the difference between a reference type and a value type if they are immutable? Reflection is cheating. I'm wondering this mostly out of curiosity.

    Read the article

  • What's the standard location of a 3D clipping box?

    - by Kendall Frey
    The way I understand 3D rendering, polygons are transformed using several matrices, and they are then clipped if they are not inside a certain box, before projecting the box onto the screen. Before transformation, the visible area is typically a frustum, and after transformation, I am guessing it's a cube. This cube makes the clipping math easier than a frustum would. My question is, what's the 'standard' location/size for this clipping box? I can think of 3 possibilities: (0,0,0)-(1,1,1), (-0.5,-0.5,-0.5)-(0.5,0.5,0.5), (-1,-1,-1)-(1,1,1) Or is there no standard?

    Read the article

  • When should I make the first commit to source control?

    - by Kendall Frey
    I'm never sure when a project is far enough along to first commit to source control. I tend to put off committing until the project is 'framework-complete' and primarily commit features from then on. (I haven't done any personal projects large enough to have a core framework too big for this.) I have a feeling this isn't best practice, though I'm not sure what all could go wrong. Let's say, for example, I have a project which consists of a single code file. It will take about 10 lines of boilerplate code, and 100 lines to get the project working with extremely basic functionality (1 or 2 features). Should I first check in: The empty file? The boilerplate code? The first features? At some other point? Also, what are the reasons to check in at a specific point?

    Read the article

  • How to pass a filename by drag-and-drop to a shortcut in Windows

    - by Kendall Frey
    I have a program program.exe and a document document.txt, and to open the document, I can drag document.txt onto program.exe. So far so good. Now I want to call it with a command-line parameter -param so that the full command line is program.exe -param document.txt Unfortunately, I can't do this with drag and drop, so I need to fire up cmd and type in the command manually. This takes too long, and I need an easier way. How can I create a shortcut that I can drop the file onto, and have it call the program with the command-line parameter? I tried setting the shortcut to program.exe -param "%1", but that didn't work, because it appeared to pass only the file name, and not the path, and since the current directory was the one with the program and not the one with the document, it couldn't find the document.

    Read the article

  • How to pass a filename to a shortcut in Windows

    - by Kendall Frey
    I have a program program.exe and a document document.txt, and to open the document, I can drag document.txt onto program.exe. So far so good. Now I want to call it with a command-line parameter -param so that the full command line is program.exe -param document.txt Unfortunately, I can't do this with drag and drop, so I need to fire up cmd and type in the command manually. This takes too long, and I need an easier way. How can I create a shortcut that I can drop the file onto, and have it call the program with the command-line parameter? I tried setting the shortcut to program.exe -param "%1", but that didn't work, because it appeared to pass only the file name, and not the path, and since the current directory was the one with the program and not the one with the document, it couldn't find the document.

    Read the article

  • iperf max udp multicast performance peaking at 10Mbit/s?

    - by Tom Frey
    I'm trying to test UDP multicast throughput via iperf but it seems like it's not sending more than 10Mbit/s from my dev machine: C:\> iperf -c 224.0.166.111 -u -T 1 -t 100 -i 1 -b 1000000000 ------------------------------------------------------------ Client connecting to 224.0.166.111, UDP port 5001 Sending 1470 byte datagrams Setting multicast TTL to 1 UDP buffer size: 8.00 KByte (default) ------------------------------------------------------------ [156] local 192.168.1.99 port 49693 connected with 224.0.166.111 port 5001 [ ID] Interval Transfer Bandwidth [156] 0.0- 1.0 sec 1.22 MBytes 10.2 Mbits/sec [156] 1.0- 2.0 sec 1.14 MBytes 9.57 Mbits/sec [156] 2.0- 3.0 sec 1.14 MBytes 9.55 Mbits/sec [156] 3.0- 4.0 sec 1.14 MBytes 9.56 Mbits/sec [156] 4.0- 5.0 sec 1.14 MBytes 9.56 Mbits/sec [156] 5.0- 6.0 sec 1.15 MBytes 9.62 Mbits/sec [156] 6.0- 7.0 sec 1.14 MBytes 9.53 Mbits/sec When I run it on another server, I'm getting ~80Mbit/s which is quite a bit better but still not anywhere near the 1Gbps limits that I should be getting? C:\> iperf -c 224.0.166.111 -u -T 1 -t 100 -i 1 -b 1000000000 ------------------------------------------------------------ Client connecting to 224.0.166.111, UDP port 5001 Sending 1470 byte datagrams Setting multicast TTL to 1 UDP buffer size: 8.00 KByte (default) ------------------------------------------------------------ [180] local 10.0.101.102 port 51559 connected with 224.0.166.111 port 5001 [ ID] Interval Transfer Bandwidth [180] 0.0- 1.0 sec 8.60 MBytes 72.1 Mbits/sec [180] 1.0- 2.0 sec 8.73 MBytes 73.2 Mbits/sec [180] 2.0- 3.0 sec 8.76 MBytes 73.5 Mbits/sec [180] 3.0- 4.0 sec 9.58 MBytes 80.3 Mbits/sec [180] 4.0- 5.0 sec 9.95 MBytes 83.4 Mbits/sec [180] 5.0- 6.0 sec 10.5 MBytes 87.9 Mbits/sec [180] 6.0- 7.0 sec 10.9 MBytes 91.1 Mbits/sec [180] 7.0- 8.0 sec 11.2 MBytes 94.0 Mbits/sec Anybody has any idea why this is not achieving close to link limits (1Gbps)? Thanks, Tom

    Read the article

  • Syncing Google Desktop Scratch Pad

    - by Anders Frey
    I'm a long time user of Google Desktop Scratch Pad and I would like to be able to put the note in the cloud and make it accessible from all my electronic units. I'm working towards changing the filepath Scratch Pad uses to retrieve the .txt to lead to a DropBox folder. As the Desktop Scratch Pad is discontinued I've had no luck in retrieving the API, but what I've got so far is this: The scratch pad data is located at: C:\Users[user]\AppData\Local\Google\Google Desktop\a3d83d5fa2e9\scratchpad.txt The registry keys related to Google Desktop is located at: HKEY_CURRENT_USER\Software\Google\Google Desktop I'm guessing the Scratch Pad app itself is located at: HKEY_CURRENT_USER\Software\Google\Google Desktop\Components I have limited experience with the registry, so I'm not able to translate the binary and hexadecimals, but I'm hoping that the path location is in there somewhere. I've tried using a bunch of other noteapps (including the 'new' scratch pad in chrome) but haven't been able to find one that suits my needs as Desktop Scratch Pad. Hence the effort in this matter. I may be way off and I'm not sure if this is possible to do, but I'm looking forward to hearing your thoughts.

    Read the article

  • Implementing a Patricia Trie for use as a dictionary

    - by Regis Frey
    I'm attempting to implement a Patricia Trie with the methods addWord(), isWord(), and isPrefix() as a means to store a large dictionary of words for quick retrieval (including prefix search). I've read up on the concepts but they just aren't clarifying into an implementation. I want to know (in Java or Python code) how to implement the Trie, particularly the nodes (or should I implement it recursively). I saw one person who implemented it with an array of 26 child nodes set to null/None. Is there a better strategy (such as treating the letters as bits) and how would you implement it?

    Read the article

  • PHP page load seems to be requesting itself and misinterpreting the result

    - by Regis Frey
    I'm working on a messy PHP page by another developer and I was analyzing the resource view in the Webkit developer tools and noticed that the page (index.php) makes an HTTP requests for itself and then interprets the results as an image despite it being sent with the text/html header. Because of this it throws the warning: Resource interpreted as image but transferred with MIME type text/html. Looking at the time graph the call comes after the <head> because it has already requested images for the body. Sometimes there are even two 'bad' requests. Can anyone explain what might be happening and/or suggest how to fix this? Could these be related to PHP includes?

    Read the article

  • Track unicode words from Twitter using Ruby and the Tweetstream API

    - by Régis B.
    I am trying to track a set of keywords from Twitter by using the Streaming API (can't post the link here because of spam limitations: google twitter streaming API). I am doing this inside Ruby, using the TweetStream gem: http://bit.ly/cODAWI The problem I have is that I want to track keywords that contain some unicode/UTF-8 characters. For instance: require 'rubygems' require 'tweetstream' TweetStream::Client.new("my_user_name", "my_password").track("é") do |s| puts s.text end (you can try it out, provided you installed the tweetstream and json gems) This piece of code does not print anything, while replacing "é" with "e" outputs a bunch of tweets continuously. I did not find any reliable documentation about Unicode in Ruby, so I have no idea where the problem comes from. Thanks for your help!

    Read the article

  • Inheritance in Ruby on Rails: setting the base class type

    - by Régis B.
    I am implementing a single table inheritance inside Rails. Here is the corresponding migration: class CreateA < ActiveRecord::Migration def self.up create_table :a do |t| t.string :type end end Class B inherits from A: class B < A end Now, it's easy to get all instances of class B: B.find(:all) or A.find_all_by_type("B") But how do I find all instances of class A (those that are not of type B)? Is this bad organization? I tried this: A.find_all_by_type("A") But instances of class A have a nil type. I could do A.find_all_by_type(nil) but this doesn't feel right, somehow. In particular, it would stop working if I decided to make A inherit from another class. Would it be more appropriate to define a default value for :type in the migration? Something like: t.string :type, :default => "A" Am I doing something wrong here?

    Read the article

  • Alternatives to Java bytecode instrumentation

    - by Rafael Regis
    I'm starting a project that will have to instrument java applications for coverage purposes (definition-usage of variables, etc). It has to add trace statements and some logic to the application and maybe remove statements. I have searched for ways of instrument Java code and what I always find is about bytecode instrumentation. My question is: It's the only way to instrument Java applications? There is any other way to do that? What are the advantages of bytecode instrumentation over the others? I'll probably use the bytecode solution, but I want to know what are the problems with the other approaches (if any) to decide precisely. Thanks!

    Read the article

  • C# UDP decoding datagrams fails randomly

    - by Tom Frey
    Hi, I'm experiencing an issue in a multi threaded application and have been debugging it for the last 3 days but for the life of it can not figure it out. I'm writing this, hoping that I either have a DUH moment when typing this or somebody sees something obvious in the code snippets I provide. Here's what's going on: I've been working on a new UDP networking library and have a data producer that multicasts UDP datagrams to several receiver applications. The sender sends on two different sockets that are bound to separate UDP multicast addresses and separate ports. The receiver application also creates two sockets and binds each one to one of the sender's multicast address/port. When the receiver receives the datagram, it copies it from the the buffer in a MemoryStream which is then put onto a thread safe queue, where another thread reads from it and decodes the data out of the MemoryStream. Both sockets have their own queues. What happens now is really weird, it happens randomly, non-reproducible and when I run multiple receiver applications, it only happens randomly on one of them every now and then. Basically, the thread that reads the MemoryStream out of the queue, reads it via a BinaryReader like ReadInt32(), etc. and thereby decodes the data. Every now and then however when it reads the data, the data it reads from it is incorrect, e.g. a negative integer number which the sender never would encode. However, as mentioned before, the decoding only fails in one of the receiver applications, in the other ones the datagram decodes fine. Now you might be saying, well, probably the UDP datagram has a byte corruption or something but I've logged every single datagram that's coming in and compared them on all receivers and the datagrams every application receives are absolutely identical. Now it gets even weirder, when I dump the datagram that failed to decode to disk and write a unit test that reads it and runs it through the decoder, it decodes just fine. Also when I wrap a try/catch around the decoder, reset the MemoryStream position in the catch and run it through the decoder again, it decodes just fine. To make it even weirder, this also only happens when I bind both sockets to read data from the sender, if I only bind one, it doesn't happen or at least I wasn't able to reproduce it. Here are is some corresponding code to what's going on: This is the receive callback for the socket: private void ReceiveCompleted(object sender, SocketAsyncEventArgs args) { if (args.SocketError != SocketError.Success) { InternalShutdown(args.SocketError); return; } if (args.BytesTransferred > SequencedUnitHeader.UNIT_HEADER_SIZE) { DataChunk chunk = new DataChunk(args.BytesTransferred); Buffer.BlockCopy(args.Buffer, 0, chunk.Buffer, 0, args.BytesTransferred); chunk.MemoryStream = new MemoryStream(chunk.Buffer); chunk.BinaryReader = new BinaryReader(chunk.MemoryStream); chunk.SequencedUnitHeader.SequenceID = chunk.BinaryReader.ReadUInt32(); chunk.SequencedUnitHeader.Count = chunk.BinaryReader.ReadByte(); if (prevSequenceID + 1 != chunk.SequencedUnitHeader.SequenceID) { log.Error("UdpDatagramGap\tName:{0}\tExpected:{1}\tReceived:{2}", unitName, prevSequenceID + 1, chunk.SequencedUnitHeader.SequenceID); } else if (chunk.SequencedUnitHeader.SequenceID < prevSequenceID) { log.Error("UdpOutOfSequence\tName:{0}\tExpected:{1}\tReceived:{2}", unitName, prevSequenceID + 1, chunk.SequencedUnitHeader.SequenceID); } prevSequenceID = chunk.SequencedUnitHeader.SequenceID; messagePump.Produce(chunk); } else UdpStatistics.FramesRxDiscarded++; Socket.InvokeAsyncMethod(Socket.ReceiveAsync, ReceiveCompleted, asyncReceiveArgs); } Here's some stub code that decodes the data: public static void OnDataChunk(DataChunk dataChunk) { try { for (int i = 0; i < dataChunk.SequencedUnitHeader.Count; i++) { int val = dataChunk.BinaryReader.ReadInt32(); if(val < 0) throw new Exception("EncodingException"); // do something with that value } } catch (Exception ex) { writer.WriteLine("ID:" + dataChunk.SequencedUnitHeader.SequenceID + " Count:" + dataChunk.SequencedUnitHeader.Count + " " + BitConverter.ToString(dataChunk.Buffer, 0, dataChunk.Size)); writer.Flush(); log.ErrorException("OnDataChunk", ex); log.Info("RETRY FRAME:{0} Data:{1}", dataChunk.SequencedUnitHeader.SequenceID, BitConverter.ToString(dataChunk.Buffer, 0, dataChunk.Size)); dataChunk.MemoryStream.Position = 0; dataChunk.SequencedUnitHeader.SequenceID = dataChunk.BinaryReader.ReadUInt32(); dataChunk.SequencedUnitHeader.Count = dataChunk.BinaryReader.ReadByte(); OnDataChunk(dataChunk); } } You see in the catch{} part I simply reset the MemoryStream.Position to 0 and call the same method again and it works just fine that next time? I'm really out of ideas at this point and unfortunately had no DUH moment writing this. Anybody have any kind of idea what might be going on or what else I could do to troubleshoot this? Thanks, Tom

    Read the article

  • WCF issues with KnownType for Dictionary

    - by Tom Frey
    Hi, I have a service that implements the following DataMember: [DataMember] public Dictionary<string, List<IOptionQueryResult>> QueryResultItems { get; set; } I have the class "OptionQuerySingleResult" which inherits from IOptionQueryResult. Now, I understand that I need to make the OptionQueryResult type "known" to the Service and thus tried to add the KnownType in various ways: [KnownType(typeof(Dictionary<string, OptionQuerySingleResult[]>))] [KnownType(typeof(Dictionary<string, List<OptionQuerySingleResult>>))] [KnownType(typeof(OptionQuerySingleResult)] However, none of those approaches worked and on the client side I'm either getting that deserialization failed or the server simply aborted the request, causing a connection aborted error. Does anyone have an idea on what's the proper way to get this to work? I'd like to add, the if I change the QueryResultItems definition to use the concrete type, instead of the interface, everything works just fine. Thanks, Tom

    Read the article

  • ProcessCmdKey - wait for KeyUp?

    - by Tom Frey
    Hi, I'm having the following issue in a WinForms app. I'm trying to implement Hotkeys and I need to process Key messages whenever the control is active, no matter if the focus is on a textbox within that control, etc. Overriding ProcessCmdKey works beautifully for this and does exactly what I want with one exception: If a user presses a key and keeps it pressed, ProcessCmdKey keeps triggering WM_KEYDOWN events. However, what I want to achieve is that the user has to release the button again before another hotkey action would trigger (so, if someone sits on the keyboard it would not cause continuous hotkey events). However, I can't find where to catch WM_KEYUP events, so I can set a flag if it should process ProcessCmdKey messages again? Anyone can help out here? Thanks, Tom

    Read the article

  • IE7 div floating bug

    - by Michael Frey
    I have the following <div id="border" style="width:100%; border:8px solid #FFF"> <div id="menu" style="width:250px; float:left;" > Some menu </div> <div id="content" style="padding-left:270px; width:520px;" > Main page content </div> </div> This gives me a left aligned menu and the content to the right of it, all surrounded by a border. On all browsers including IE8 it displays correctly. But on IE7 the content only starts below the menu, and leaves a big open space to the right of the menu. I have searched all kind of solutions and tried all kinds of combinations of right, left, none for float. clearing left right both. It always displays different on the browsers. Any help is appreciated. Michael

    Read the article

  • StructureMap: Wiring (generic) implementations to an implementation of another type

    - by Jeremy Frey
    If I have an interface: public interface IRepository<T> And an abstract class: public abstract class LinqToSqlRepository<T, TContext> : IRepository<T> where T : class where TContext : DataContext And a whole bunch of implementations of IRepository / LinqToSqlRepository (e.g. AccountRepository, ContactRepository, etc.), what's the best way to to use StructureMap (2.5.3) to generically wire them all up? e.g., I want this code to pass: [Test] public void ShouldWireUpAccountRepositories { var accountRepo = ObjectFactory.GetInstance<IRepository<Account>>(); Assert.IsInstanceOf<AccountRepository>(accountRepo); } Without explicitly writing this: ObjectFactory.Configure(x => x.ForRequestedType<IRepository<Account>>() .TheDefaultIsConcreteType<AccountRepository>()); In the past, we've always created a specific interface on each repository that inherited from the generic one, and used the default scanner to automatically wire all of those instances, but I'd like to be able to ask specifically for an IRepository<Account> without cluttering up the project with additional interfaces / configurations.

    Read the article

  • PHP code not working on IE

    - by Michael Frey
    I have a website with a flag. If it is clicked, the language of the website changes. Here is the code displaying the flag, which is a form with post event: <?php $pagename = $_SERVER['REQUEST_URI']; echo '<form action="'.$pagename.'" method="post"> <input name="formlanguage" type="image" '; if ($_SESSION['lang'] == 0) { echo 'alt="English" src="images/en.png" value="1" '; } else { echo 'alt="Deutsch" src="images/de.png" value="0" '; } echo '/></form>'; ?> Here is the response to that, and this part always fails on IE: if (isset($_POST['formlanguage'])) { $_SESSION['lang']=$_POST['formlanguage']; } I can not figure out why it works on Chrome but not IE. I assume that it might be a setting of IE. But what could that be?

    Read the article

  • BlazeDS - Conversion from ArrayList <BaseClass> on java side to Actionscript

    - by user294280
    Hi, So we have a java class with two ArrayLists of generics. It looks like public class Blah { public ArrayList<ConcreteClass> a; public ArrayList<BaseClass> b; } by using [ArrayElementType('ConcreteClass')] in the actionscript class, we are able to get all the "a"s converted fine. However with "b", since the actual class coming across the line is a heterogeneous mix of classes like BaseClassImplementation1, BaseClassImplementation2 etc, it gets typed as an object. Is there a way to convert it to the specific concrete class assuming that a strongly typed AS version of the java class exists on the client side thanks for your help! Regis

    Read the article

  • Best Online Programming Degree? (Masters Level)

    - by Jason
    I am less then a year from graduating with my bachelors in web development, however I would like to continue on with a masters in programming. As far as I can tell, what I want is a masters in software engineering. Sadly my current college only offers more management oriented masters level degrees, and I want something that is programming, not business. Ultimately my goal is to teach online and work freelance on the side. Here's the problem - I am visually impaired, so I do not drive and I prefer to take my classes entirely online. I have heard enough to avoid university of phoenix... and I have heard some good about walden, regis, and penn state's online MSSE programs. I am wondering if anyone here knows of any other good ones, or ones I should avoid. I have heard mixed reviews of Colorado Tech.

    Read the article

  • check if username exists on form submit

    - by Developer
    This is my code. .js $(document).ready(function() { $("#username").focusout(function() { $.ajax({ type:'post', url:site_url()+'/client/checkUserName', data:{'username':$("#username").val()}, dataType:'json', success:function(result){ if(result != 'false'){ $('#message').text('Username exists'); } } }); }); .html <form id='form1' method="post"> <input type="text" name="username" id="username"/> <span id="message" style="color:red"></span> <input type="submit" value="submit" id="regis" class="btn"/> </form> Its working fine on focusout. How to make the form to not submit if username exists? Suppose there is a hidden field in the form say <input type="text" hidden id="type" value="<?php echo $type;?>"> Then if value exists in the hidden field then the username neednot be checked if already exists or not.

    Read the article

  • Culture Shmulture?

    - by steve.diamond
    I've been thinking about "Customer Experience Management" lately. Here at Oracle, we arguably have the most complete suite of applications for managing the customer experience across and in the context of multiple channels -- from marketing to loyalty to contact center to self-service to analytics offerings, and more. And stay tuned, because in coming months let's just say we'll have even more to talk about on this front. But that said............ Last weekend my wife and I stayed at one of the premiere hotel chains on the planet. I won't name them, but we all know the short list. It could have been the St. Regis or the Ritz Carlton or Four Seasons or Hyatt Park or....This stay, at this particular hotel, was simply outstanding. Within a chain known for providing "above and beyond" levels of service, this particular hotel, under this particular manager, exceeded expectations on so many fronts. For example, at the Spa we mentioned to the two attendants that my wife is seven months pregnant and that we had previously had a lot of trouble conceiving. We then went to our room. Ten minutes later we heard a knock at the door and received a plate of chocolate covered strawberries with a heartfelt note and an inspiring quote, signed by the two spa attendees. The following day we arranged to have a bellhop drive us to the beach. Although they had a pre-arranged beach shuttle service with time limits, etc., he greeted us by saying, "I'm yours for the day until 4 p.m. Whatever you want to do is fine by me, as long as it's legal!" The morning that we left we arranged to have a taxi drive us to the airport--a nearly 40 mile drive. What showed up was a private coach complete with navy blue suited driver dude. And we were charged the taxi fare price. And there were many other awesome exchanges I won't mention here, although I did email the GM of this hotel two nights ago and expressed our effusive praise and gratitude. I'd submit that this hotel chain would have a definitive advantage using even more Oracle software to manage and optimize its customer interactions (yes, they are a customer). But WITHOUT the culture--that management team--and that instillation of aligned values across all employees of exemplifying 'the golden rule,' I wonder how much technology really matters in providing a distinctively positive and memorable customer experience. Lest you think I'm alone in these pontifications, have you read Paul Greenberg's blog lately? Have you seen one of his most recent posts? Now this SPECIFIC post is NOT about customer service per se. But it is about people. So yes, please think long and hard about the technology you seek to deploy. But never forget who will be interacting with your systems, and your customers.

    Read the article

1 2  | Next Page >