Search Results

Search found 2964 results on 119 pages for 'lucky cool'.

Page 96/119 | < Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >

  • python unhashable type - posting xml data

    - by eterry28
    First, I'm not a python programmer. I'm an old C dog that's learned new Java and PHP tricks, but python looks like a pretty cool language. I'm getting an error that I can't quite follow. The error follows the code below. import httplib, urllib url = "pdb-services-beta.nipr.com" xml = '<?xml version="1.0"?><!DOCTYPE SCB_Request SYSTEM "http://www.nipr.com/html/SCB_XML_Request.dtd"><SCB_Request Request_Type="Create_Report"><SCB_Login_Data CustomerID="someuser" Passwd="somepass" /><SCB_Create_Report_Request Title=""><Producer_List><NIPR_Num_List_XML><NIPR_Num NIPR_Num="8980608" /><NIPR_Num NIPR_Num="7597855" /><NIPR_Num NIPR_Num="10166016" /></NIPR_Num_List_XML></Producer_List></SCB_Create_Report_Request></SCB_Request>' params = {} params['xmldata'] = xml headers = {} headers['Content-type'] = 'text/xml' headers['Accept'] = '*/*' headers['Content-Length'] = "%d" % len(xml) connection = httplib.HTTPSConnection(url) connection.set_debuglevel(1) connection.request("POST", "/pdb-xml-reports/scb_xmlclient.cgi", params, headers) response = connection.getresponse() print response.status, response.reason data = response.read() print data connection.close Here's the error: Traceback (most recent call last): File "C:\Python27\tutorial.py", line 14, in connection.request("POST", "/pdb-xml-reports/scb_xmlclient.cgi", params, headers) File "C:\Python27\lib\httplib.py", line 958, in request self._send_request(method, url, body, headers) File "C:\Python27\lib\httplib.py", line 992, in _send_request self.endheaders(body) File "C:\Python27\lib\httplib.py", line 954, in endheaders self._send_output(message_body) File "C:\Python27\lib\httplib.py", line 818, in _send_output self.send(message_body) File "C:\Python27\lib\httplib.py", line 790, in send self.sock.sendall(data) File "C:\Python27\lib\ssl.py", line 229, in sendall v = self.send(data[count:]) TypeError: unhashable type My log file says that the xmldata parameter is empty. Any ideas?

    Read the article

  • Stresstesting ASP.NET/IIS with WCAT

    - by MartinHN
    I'm trying to setup a stress/load test using the WCAT toolkit included in the IIS Resources. Using LogParser, I've processed a UBR file with configuration. It looks something like this: [Configuration] NumClientMachines: 1 # number of distinct client machines to use NumClientThreads: 100 # number of threads per machine AsynchronousWait: TRUE # asynchronous wait for think and delay Duration: 5m # length of experiment (m = minutes, s = seconds) MaxRecvBuffer: 8192K # suggested maximum received buffer ThinkTime: 0s # maximum think-time before next request WarmupTime: 5s # time to warm up before taking statistics CooldownTime: 6s # time to cool down at the end of the experiment [Performance] [Script] SET RequestHeader = "Accept: */*\r\n" APP RequestHeader = "Accept-Language: en-us\r\n" APP RequestHeader = "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705)\r\n" APP RequestHeader = "Host: %HOST%\r\n" NEW TRANSACTION classId = 1 NEW REQUEST HTTP ResponseStatusCode = 200 Weight = 45117 verb = "GET" URL = "http://Url1.com" NEW TRANSACTION classId = 3 NEW REQUEST HTTP ResponseStatusCode = 200 Weight = 13662 verb = "GET" URL = "http://Url1.com/test.aspx" Does it look OK? I execute the controller with this command: wcctl -z StressTest.ubr -a localhost The Client(s) is executed like this: wcclient localhost When the client is executed, I get this error: main client thread Connect Attempt 0 Failed. Error = 10061 Has anyone in this world ever used WCAT?

    Read the article

  • "cloud architecture" concepts in a system architecture diagrams

    - by markus
    If you design a distributed application for easy scale-out, or you just want to make use of any of the new “cloud computing” offerings by Amazon, Google or Microsoft, there are some typical concepts or components you usually end up using: distributed blob storage (aka S3) asynchronous, durable message queues (aka SQS) non-Relational-/non-transactional databases (like SimpleDB, Google BigTable, Azure SQL Services) distributed background worker pool load-balanced, edge-service processes handling user requests (often virtualized) distributed caches (like memcached) CDN (content delivery network like Akamai) Now when it comes to design and sketch an architecture that makes use of such patterns, are there any commonly used symbols I could use? Or even a download with some cool Visio stencils? :) It doesn’t have to be a formal system like UML but I think it would be great if there were symbols that everyone knows and understands, like we have commonly used shapes for databases or a documents, for example. I think it would be important to not mix it up with traditional concepts like a normal file system (local or network server/SAN), or a relational database. Simply speaking, I want to be able to draw some conclusions about an application’s scalability or data consistency issues by just looking at the system architecture overview diagram. Update: Thank you very much for your answers. I like the idea of putting a small "cloud symbol" on the traditional symbols. However I leave this thread open just in case someone will find specific symbols (maybe in a book or so) - or uploaded some pimped up Visio stencils ;)

    Read the article

  • HOW TO: Draggable legend in matplotlib

    - by Adam Fraser
    QUESTION: I'm drawing a legend on an axes object in matplotlib but the default positioning which claims to place it in a smart place doesn't seem to work. Ideally, I'd like to have the legend be draggable by the user. How can this be done? SOLUTION: Well, I found bits and pieces of the solution scattered among mailing lists. I've come up with a nice modular chunk of code that you can drop in and use... here it is: class DraggableLegend: def __init__(self, legend): self.legend = legend self.gotLegend = False legend.figure.canvas.mpl_connect('motion_notify_event', self.on_motion) legend.figure.canvas.mpl_connect('pick_event', self.on_pick) legend.figure.canvas.mpl_connect('button_release_event', self.on_release) legend.set_picker(self.my_legend_picker) def on_motion(self, evt): if self.gotLegend: dx = evt.x - self.mouse_x dy = evt.y - self.mouse_y loc_in_canvas = self.legend_x + dx, self.legend_y + dy loc_in_norm_axes = self.legend.parent.transAxes.inverted().transform_point(loc_in_canvas) self.legend._loc = tuple(loc_in_norm_axes) self.legend.figure.canvas.draw() def my_legend_picker(self, legend, evt): return self.legend.legendPatch.contains(evt) def on_pick(self, evt): if evt.artist == self.legend: bbox = self.legend.get_window_extent() self.mouse_x = evt.mouseevent.x self.mouse_y = evt.mouseevent.y self.legend_x = bbox.xmin self.legend_y = bbox.ymin self.gotLegend = 1 def on_release(self, event): if self.gotLegend: self.gotLegend = False ...and in your code... def draw(self): ax = self.figure.add_subplot(111) scatter = ax.scatter(np.random.randn(100), np.random.randn(100)) legend = DraggableLegend(ax.legend()) I emailed the Matplotlib-users group and John Hunter was kind enough to add my solution it to SVN HEAD. On Thu, Jan 28, 2010 at 3:02 PM, Adam Fraser wrote: I thought I'd share a solution to the draggable legend problem since it took me forever to assimilate all the scattered knowledge on the mailing lists... Cool -- nice example. I added the code to legend.py. Now you can do leg = ax.legend() leg.draggable() to enable draggable mode. You can repeatedly call this func to toggle the draggable state. I hope this is helpful to people working with matplotlib.

    Read the article

  • Filter Dynamically Calendar View SharePoint

    - by lerac
    Hello world I'm using SP wss 3.0 wondering if anybody knows how to filter a calendar view in SharePoint dynamically based upon the current user. It's not the simple question of using [ME] because this will not work with single line text fields. Also users do not add the items, they are being imported. So filtering on the basis of Created by, Modified by, Assigned to, or People picking data is not a option. Already managed to get to the current user in a jScript variable, now I would like to filter it in the calendar view. Been searching for a long time now, but can't seem to find anything. Altough filtering with a all items view is possible, yet I can't seem to find a way to dynamically filter a calendar view. Already tried modifing allitems.aspx view page in Designer Fooling around with CAML jScript (as far as I know) Calculated views Google (find more other cool things then a solution) Ofcourse I don't expect a solution on a silver platter (ofcourse would be nice ;) ), but if somebody can point me into a direction I already would be quite happy.

    Read the article

  • Perf: Viewing thousands of images in Silverlight 3 on a 3D Wall

    - by Bob Holland
    I currently work on a very cool Silverlight app that displays photos in a 3D wall space like the Wall3D demo that is thrown in with Blend 3. The problem I am currently facing is performance. The app works like this: As you scroll right or left the 3d photo wall rotates As each movement is made, the next column of photos are downloaded, decoded into a BitmapImage and thrown into a 3D Wall Node. As you can imagine users (if you let them) will want to flip through the photos really quickly, but the problem I have is I cannot display the photos quick enough. In most cases it's a beautiful app that works really well, but when an album contains over 300 photos, you can imagine the sort of memory taken up by all the BitmapImage classes and how moving the slider can jump from photo 20 to photo 120 in a second. Of course we have algorithms in place to not download every photo in between, but I still can't work out a fast way to get the photos displayed. It may be a case that we need to throw away the 'great for show' 3D wall and go to a flat DeepZoom like wall like the Playboy archive one that Vertigo did. Still not sure, let me know your thoughts. P.S. We are using Kit3D for all the 3D work, it's using PerspectiveCamera, Model3DGroup, ModelVisual3D, RotateTransform3D & TranslateTransform3D. Cheers, Bob.

    Read the article

  • jQuery UI Tabs customization for many tabs

    - by Tauren
    I'd like to implement a tab bar using jquery-ui-tabs that has been customised to work like it does on HootSuite. Try this on HootSuite to see what I mean: Log in to your hootsuite.com account Click the + symbol to the right of your tabs Add tabs named "MMMMMMMMMMMMMMMMM" until a "More..." tab appears You'll see this: HootSuite includes the following features, all of which I would like to do: Fit as many tabs as possible onto the screen. Users with larger screens would see more tabs. If they run out of space, a "More..." tab would appear with a drop-down list Clicking onto the More tab would drop down a list of additional tabs Tabs can be dragged and rearranged. Tabs in the More drop-down list can be dragged to the tab bar Delete tabs with a small X next to the tab name Add tabs with a + icon to the right of the last tab I already have a tab bar working that does 4 and 6. I found a Paging Tab Plugin which is pretty cool, but works differently. Does anyone know of plugins or techniques that would help me accomplish the above? My thought is to not really make the More tab a real tab, but just an object that looks like a tab. I'd add logic to the tabs.add method to calculate if another tab can fit. If it can't, then I would add the details of the tab to my separate "More" list. There'd be a fair amount of effort to get this all working, so if there are any plugins that would help, I'd love to hear about them.

    Read the article

  • Jmock mock DAO object

    - by Gandalf StormCrow
    Hi all, I wrote a method that retrieves certain list of strings, given a correct string key. Now when I create a list(the one to be retrieved by method descibed in previous sentence) and create test I can easily get results and test passes successfully. Now on the other hand if I save the content of this list to database in 2 columns, key and value I wrote a class which retrieves this items with method inside it. And when I print it out to console the expected results are correct, now I initialize my DAO from application context where inside its bean it gets session and because of DAO works. Now I'm trying to write a test which will mock the DAO, because I'm running test localy not on the server .. so I told jmock to mock it : private MyDAO myDAO; in the setup() myDAO = context.mock(MyDAO.class); I think I'm mocking it correctly or not, how can I mock this data from database? what is the best way? Is there somewhere good Jmock documentation? on their official site its not very good and clear, you have to know what you seek in order to find it, can't discover something cool in the mean time.

    Read the article

  • Microsoft Surface - Flip & Scatter View Items

    - by Angelus
    Hi Guys, I'm currently trying to get flip to work with scatterview items, and I'm having some trouble conceptually with it, using a plugin called Thriple (http://thriple.codeplex.com/). Essentially, a 2 sided thriple control looks like this: <thriple:ContentControl3D xmlns:thriple="http://thriple.codeplex.com/" Background="LightBlue" BorderBrush="Black" BorderThickness="2" MaxWidth="200" MaxHeight="200" > <thriple:ContentControl3D.Content> <Button Content="Front Side" Command="thriple:ContentControl3D.RotateCommand" Width="100" Height="100" /> </thriple:ContentControl3D.Content> <thriple:ContentControl3D.BackContent> <Button Content="Back Side" Command="thriple:ContentControl3D.RotateCommand" Width="100" Height="100" /> </thriple:ContentControl3D.BackContent> </thriple:ContentControl3D> What I'm struggling to grasp is if I should be making 2 separate ScatterView templates to bind to the data I want, and then each one would be the "front" and "back" of a scatterview item OR should i make 2 separate ScatterView items which are bound to the data I want, which is then bound to the "back" and "front" of a main ScatterView item? If there is a better way of using doing flip animations with ScatterViewItem's, that'd be cool too! Thanks!

    Read the article

  • How to check whether a user belongs to an AD group and nested groups?

    - by elsharpo
    hi guys, I have an ASP.NET 3.5 application using Windows Authentication and implementing our own RoleProvider. Problem is we want to restrict access to a set of pages to a few thousand users and rathern than inputing all of those one by one we found out they belong to an AD group. The answer is simple if the common group we are checking membership against the particular user is a direct member of it but the problem I'm having is that if the group is a member of another group and then subsequently member of another group then my code always returns false. For example: Say we want to check whether User is a member of group E, but User is not a direct member of *E", she is a member of "A" which a member of "B" which indeed is a member of E, therefore User is a member of *E" One of the solutions we have is very slow, although it gives the correct answer using (var context = new PrincipalContext(ContextType.Domain)) { using (var group = GroupPrincipal.FindByIdentity(context, IdentityType.Name, "DL-COOL-USERS")) { var users = group.GetMembers(true); // recursively enumerate return users.Any(a => a.Name == "userName"); } } The original solution and what I was trying to get to work, using .NET 3.5 System.DirectoryServices.AccountManagement and it does work when users are direct members of the group in question is as follows: public bool IsUserInGroup(string userName, string groupName) { var cxt = new PrincipalContext(ContextType.Domain, "DOMAIN"); var user = UserPrincipal.FindByIdentity(cxt, IdentityType.SamAccountName, userName); if (user == null) { return false; } var group = GroupPrincipal.FindByIdentity(cxt, groupName); if (group == null) { return false; } return user.IsMemberOf(group); } The bottom line is, we need to check for membership even though the groups are nested in many levels down. Thanks a lot!

    Read the article

  • UI design in flash games

    - by anon
    This question is more UI/Design-ish than hard-core programming is. Background: I've been coding in VIM/C++/OpenGL for a long time. I've come to realize that this (VIM/C++/OpenGL) isn't the way to learn about programming fancy/cool-looking/futuristic UIs; and that the design of such UIs belongs more so in the artistic/designer world of Flash. Anyway, I currently have a machine with MacOSX. What software should I install? What book should I read to learn about the artistic/design side of these futuristic UIs? [It's okay if the tools to design them are mouse clicking + graphical rather than coding based]. Question: what software packages + books to read to learn about creating fancy-looking / futuristic UIs in flash? Thanks! EDIT: PS these questions seem to get closed frequently. If you're going to vote to close for "duplicate question"; atleast provide a link to the question (with an answer).

    Read the article

  • Python for a hobbyist programmer ( a few questions)

    - by Matt
    I'm a hobbyist programmer (only in TI-Basic before now), and after much, much, much debating with myself, I've decided to learn Python. I don't have a ton of free time to teach myself a hundred languages and all programming I do will be for personal use or for distributing to people who need them, so I decided that I needed one good, strong language to be good at. My questions: Is python powerful enough to handle most things that a typical programmer might do in his off-time? I have in mind things like complex stat generators based on user input for tabletop games, making small games, automate install processes, and build interactive websites, but probably a hundred things along those lines Does python handle networking tasks fairly well? Can python source be obscufated (mispelled I think), or is it going to be open-source by nature? The reason I ask this is because if I make something cool and distribute it, I don't want some idiot script kiddie to edit his own name in and say he wrote it And how popular is python, compared to other languages. Ideally, my language would be good and useful with help found online without extreme difficulty, but not so common that every idiot with computer knows python. I like the idea of knowing a slightly obscure language. Thanks a ton for any help you can provide.

    Read the article

  • When do married programmers find time to work?

    - by dave-keiture
    Hi people, Maybe my problem is unique (though I don't believe so), and probably I should go with it to the psychologist, but sinse I get married (~year ago) I feel that I don't have enough time to work anymore. For years I've been working at my day job doing regular stuff, and at nights I've been committing to the opensource projects, freelancing and self-educating. Now, I can't work at home at all, because once I start working, my wife either says that there're more important thing to do (walk out the dog, buy something in a grocery, etc.) or that I don't pay anough attention to her.. As a workaround, I've started getting up at 3-4AM in the morning to do the things I was usually doing nightly before. After a month of such schedule I feel myself totally crushed. So... 2 questions: Do you have the same problems, or I'm just a <..., who should say goodbye to programming, and start doing "really important things"? If you have the same problems, when do you find time to work? Maybe you know any cool lifehack or trick to spend at least some tome for doing the thing you like :) Best regards.

    Read the article

  • [iPhone] Background color during flip view animation/transition?

    - by Rob S.
    I have some pretty standing flipping action going on: [UIView beginAnimations:@"swapScreens" context:nil]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES]; [UIView setAnimationDuration:1.0]; [self.view exchangeSubviewAtIndex:0 withSubviewAtIndex:1]; [UIView commitAnimations]; To Apple's credit, this style of animation is amazingly easy to work with. Very cool, and I've been able to animate transitions, flips, fades etc. throughout the app very easily. Question: During the flip transition, the background visible 'behind' the two views during the flip is white and I'd like it to be black. I've: Set the background of the containing view (self.view above) - no dice. I really thought that would work. Set the background of each view to black - no dice. I didn't think this would work although you give different things a shot to understand better :) Google'd like crazy; keep landing on Safari-related listings. Thanks in advance!

    Read the article

  • Computer science final year project ideas

    - by roul
    I'm a Computer Science undergraduate student in UK and should be deciding the subject of my final year project soon. The school is pretty flexible with the subject... "The topic can be any area of the subject which is of mutual interest to both the student and supervisor. Topics can range from purely theoretical studies to practical work building a system for some third party, although most projects aim to provide a balance between the theoretical and practical aspects of the subject." ...so I'm a bit lost since I want to do something in software engineering but have no idea what (subject) or with what (languages)! :) a) Languages: I've had experience with Java, C# and ASP.NET mostly but I would definitely be interested in learning new languages/frameworks. I'm kind of drawn by the idea of dynamic languages at the moment so IronPython seems likely. b) Subject: Anything that will keep me interested through the year and will give me the opportunity to learn a lot of stuff. Maybe something that has to do with music, or a fancy website, or a website about music :P anything really. Open to any thoughts/ideas, geeky or cool! Edit: Professors do usually supervise projects in their research areas but I currently have the choice to approach any of them according to my interest - whatever that is.

    Read the article

  • Primary Key Identity Value Increments On Unique Key Constraint Violation

    - by Jed
    I have a SqlServer 2008 table which has a Primary Key (IsIdentity=Yes) and three other fields that make up a Unique Key constraint. In addition I have a store procedure that inserts a record into the table and I call the sproc via C# using a SqlConnection object. The C# sproc call works fine, however I have noticed interesting results when the C# sproc call violates the Unique Key constraint.... When the sproc call violates the Unique Key constraint, a SqlException is thrown - which is no surprise and cool. However, I notice that the next record that is successfully added to the table has a PK value that is not exactly one more than the previous record - For example: Say the table has five records where the PK values are 1,2,3,4, and 5. The sproc attempts to insert a sixth record, but the Unique Key constraint is violated and, so, the sixth record is not inserted. Then the sproc attempts to insert another record and this time it is successful. - This new record is given a PK value of 7 instead of 6. Is this normal behavior? If so, can you give me a reason why this is so? (If a record fails to insert, why is the PK index incremented?) If this is not normal behavior, can you give me any hints as to why I am seeing these symptoms?

    Read the article

  • Eclipse Plug-In Installation Issues

    - by Mudu
    Hi all I'm beginning to work with Eclipse for some Java development. I'm quite new to Eclipse, as I am a Visual Studio developer normally. I tried to install the CheckStyle Eclipse Plug-In and Subversive, using the Eclipse "Install new Software" feature. No errors, everything seems to have worked well. Clicking on "What software is already installed?" in the Install-dialogue shows me a list of installed plug-ins. Both Subversive and CheckStyle for Eclipse are listed. My only problem is that neither of them "work", that means I cannot see any new UI elements. According to the manual I have, I should see a new node "CheckStyle" in a project's properties. I haven't. I don't know exactly what Subversive looks like, but I'm sure there's a way to conveniently perform check-out operations etc. Manually copying the downloaded plug-in to the dropins-folder and restarting Eclipse subsequently does not help either. Is there a way to reliably find out whether there occurred any errors - I have no error message at all, what drives me crazy and makes the problem pretty difficult to describe/Google... Any help would be very cool! Cheers Matthias

    Read the article

  • Getting a gestureoverlayview

    - by Codejoy
    I have been using some nice tutorials on drawing graphics on my android. I wanted to also add in the cool gesture demo found here: http://developer.android.com/resources/articles/gestures.html That takes these lines of code: GestureOverlayView gestures = (GestureOverlayView) findViewById(R.id.gestures); gestures.addOnGesturePerformedListener(this); This is fine and dandy yet I realize in my demo i'm trying to build using code from "Playing with Graphics in Android". The demos make sense, everything makes sense but I found out by using: setContentView(new Panel(this)); as is required by the Playing With Graphics tutorials, then the findViewById seems to no longer be valid and returns null. At first I was about to post a stupider question as to why this is happening, a quick test of playing with the setContentView made me realize the cause of findViewById returning null, I just do not know how to remedy this issue. Whats the key I am missing here? I realize that the new Panel is doinking some reference up but I am not sure how to make the connection here. THe: R.id.gestures is defined right int he main.xml as: (just like the tutorial) Thanks, Shane p.s. im new here be gentle.

    Read the article

  • JSON / JSONP in JQuery

    - by dotnetgeek
    Hello. I am trying to figure out why my $.getJSON method does not seem to be working but the $.ajax works just fine. First, here is my getJSON call: $.getJSON("http://localhost:1505/getServiceImageList?callback=loadImagesInSelect", loadImagesInSelect); You can see I have tried added the callback parameter directly to the query string (also tried it not on string) and I added a reference to the callback method defined in my js file. Here is the $.ajax call which works just fine: function getImages() { $.ajax({ type: "GET", url: $('#txt_registry_url').val(), dataType: "jsonp", success:loadImagesInSelect , error:function (xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(thrownError); } }); } In this example the url pulled from the text box is the same as in the straight call to getJSON. When the method call completes, the successMethod is called and everything processes just fine. While I am cool with using the later of the two methods, the docs make it seem that the getJSON is the preferred shorthand way of doing things. Can anyone please explain what I am missing on the shorthand method to make it all work? Thanks in advance.

    Read the article

  • Concurrent cartesian product algorithm in Clojure

    - by jqno
    Is there a good algorithm to calculate the cartesian product of three seqs concurrently in Clojure? I'm working on a small hobby project in Clojure, mainly as a means to learn the language, and its concurrency features. In my project, I need to calculate the cartesian product of three seqs (and do something with the results). I found the cartesian-product function in clojure.contrib.combinatorics, which works pretty well. However, the calculation of the cartesian product turns out to be the bottleneck of the program. Therefore, I'd like to perform the calculation concurrently. Now, for the map function, there's a convenient pmap alternative that magically makes the thing concurrent. Which is cool :). Unfortunately, such a thing doesn't exist for cartesian-product. I've looked at the source code, but I can't find an easy way to make it concurrent myself. Also, I've tried to implement an algorithm myself using map, but I guess my algorithmic skills aren't what they used to be. I managed to come up with something ugly for two seqs, but three was definitely a bridge too far. So, does anyone know of an algorithm that's already concurrent, or one that I can parallelize myself?

    Read the article

  • Flash vs. Ajax Abilities

    - by Alex
    Hey everyone. I want to develop an application that does a bunch of cool stuff. The first thing that I need in it is to get information about the page a person is browsing. With that said, I need for example to know how long a user stayed in a page and where was the scrollbar. While getting that data, It's all saved to a database. The thing is, I prefer doing that in Flash [although I have no experience in it] over Ajax since I want to hide the code - which as far as I know not possible in Javascript/Ajax. So, can I do all that in Flash? - Read the content of the page, get the status of the scroll bar.. Plus, I then need to go threw the gathered information that is saved in the database. Since there could be many calculations i thought C++ .Net is better than PHP [which I know better]. Is that all possible or am I just crazy? :) Thanks ahead.

    Read the article

  • Visual Studio Macros on 64 bit fail with COM error

    - by bruce.kinchin
    I'm doing some javascript development and found a cool macro to region my code ("Using #region Directive With JavaScript Files in Visual Studio"). I used this on my 32 bit box, and it worked first time. (Visual Studio 2008 SP1, Win7) For easy of reference the macro is: Option Strict Off Option Explicit Off Imports System Imports EnvDTE Imports EnvDTE80 Imports System.Diagnostics Imports System.Collections Public Module JsMacros Sub OutlineRegions() Dim selection As EnvDTE.TextSelection = DTE.ActiveDocument.Selection Const REGION_START As String = "//#region" Const REGION_END As String = "//#endregion" DTE.ExecuteCommand("Edit.StopOutlining") selection.SelectAll() Dim text As String = selection.Text selection.StartOfDocument(True) Dim startIndex As Integer Dim endIndex As Integer Dim lastIndex As Integer = 0 Dim startRegions As Stack = New Stack() Do startIndex = text.IndexOf(REGION_START, lastIndex) endIndex = text.IndexOf(REGION_END, lastIndex) If startIndex = -1 AndAlso endIndex = -1 Then Exit Do End If If startIndex <> -1 AndAlso startIndex < endIndex Then startRegions.Push(startIndex) lastIndex = startIndex + 1 Else ' Outline region ... selection.MoveToLineAndOffset(CalcLineNumber(text, CInt(startRegions.Pop())), text.Length) selection.MoveToLineAndOffset(CalcLineNumber(text, endIndex) + 1, 1, True) selection.OutlineSection() lastIndex = endIndex + 1 End If Loop selection.StartOfDocument() End Sub Private Function CalcLineNumber(ByVal text As String, ByVal index As Integer) Dim lineNumber As Integer = 1 Dim i As Integer = 0 While i < index If text.Chars(i) = vbCr Then lineNumber += 1 i += 1 End If i += 1 End While Return lineNumber End Function End Module I then tried to use the same macro on two separate 64 bit machines (Win7 x64), identical other than the 64 bit OS version and it fails to work. Stepping through it with the Visual Studio Macros IDE, it fails the first time on the DTE.ExecuteCommand("Edit.StopOutlining") line with a COM error (Error HRESULT E_FAIL has been returned from a call to a COM component). If I attempt to run it a second time, I can run it from the Macro Editor with no issue, but not from within Visual Studio with the macro explorer 'run macro' command. I have reviewed the following articles without finding anything helpful: Stackoverflow: Visual Studio 2008 macro only works from the Macro IDE, not the Macro Explorer Recorded macro does not run; Failing on DTE.ExecuteCommand Am I missing something dumb?

    Read the article

  • Javascript :(….. Oh!! So its jquery? Now what?? I’m a C# Guy

    - by Shekhar_Pro
    Hi guys I want you to Guide me here. This other day I was working out some AJAX for my ASP.Net website and handling client side code in Java was taking the hell out of me. Then I got my hands on this Book jQuery In Action 2nd Edition and solved my problem with the help of Example code in the book. Now as I checked the contents I got an overview that whatever I had ever thought of doing can be done by this jQuery so easily and quite cleanly. I am actually pretty new to web development (say abt 4months ) and from C# world where we have cool libraries and Simple and Elegant coding style. (yeah including those generic, Ienumerable, lambadas, chained statements.. you got it…) and you know what you’re doing when writing some code. And we have so great IntelliSense to care., and above all we have everything Strongly Typed. But in Javascript everything is so messy.. . (and I don’t know why they are not properly indented.. see page source ) Now tell me what should I do, go straight with jQuery or should I first learn Javascript (like a disciplined boy…I even have a book for that too… got in gift :) …. ) I have seen Is it a good idea to learn JavaScript before learning jQuery? but remember I have already got a project on my hand…

    Read the article

  • DATE lookup table (1990/01/01:2041/12/31)

    - by Frank Developer
    I use a DATE's master table for looking up dates and other values in order to control several events, intervals and calculations within my app. It has rows for every single day begining from 01/01/1990 to 12/31/2041. One example of how I use this lookup table is: A customer pawned an item on: JAN-31-2010 Customer returns on MAY-03-2010 to make an interest pymt to avoid forfeiting the item. If he pays 1 months interest, the employee enters a "1" and the app looks-up the pawn date (JAN-31-2010) in date master table and puts FEB-28-2010 in the applicable interest pymt date. FEB-28 is returned because FEB-31's dont exist! If 2010 were a leap-year, it would've returned FEB-29. If customer pays 2 months, MAR-31-2010 is returned. 3 months, APR-30... If customer pays more than 3 months or another period not covered by the date lookup table, employee manually enters the applicable date. Here's what the date lookup table looks like: { Copyright 1990:2010, Frank Computer, Inc. } { DBDATE=YMD4- (correctly sorted for faster lookup) } CREATE TABLE datemast ( dm_lookup DATE, {lookup col used for obtaining values below} dm_workday CHAR(2), {NULL=Normal Working Date,} {NW=National Holiday(Working Date),} {NN=National Holiday(Non-Working Date),} {NH=National Holiday(Half-Day Working Date),} {CN=Company Proclamated(Non-Working Date),} {CH=Company Proclamated(Half-Day Working Date)} {several other columns omitted} dm_description CHAR(30), {NULL, holiday description or any comments} dm_day_num SMALLINT, {number of elapsed days since begining of year} dm_days_left SMALLINT, (number of remaining days until end of year} dm_plus1_mth DATE, {plus 1 month from lookup date} dm_plus2_mth DATE, {plus 2 months from lookup date} dm_plus3_mth DATE, {plus 3 months from lookup date} dm_fy_begins DATE, {fiscal year begins on for lookup date} dm_fy_ends DATE, {fiscal year ends on for lookup date} dm_qtr_begins DATE, {quarter begins on for lookup date} dm_qtr_ends DATE, {quarter ends on for lookup date} dm_mth_begins DATE, {month begins on for lookup date} dm_mth_ends DATE, {month ends on for lookup date} dm_wk_begins DATE, {week begins on for lookup date} dm_wk_ends DATE, {week ends on for lookup date} {several other columns omitted} ) IN "S:\PAWNSHOP.DBS\DATEMAST"; Is there a better way of doing this or is it a cool method?

    Read the article

  • Did you love the game Mouse Trap as a kid, or something similar? (Programmer Psychology) [closed]

    - by Robert Oschler
    When I was a kid I absolutely fell in love with games that had as a core feature, the need to understand interconnecting structures. My favorite of all time was Mouse Trap. For the younger crowd out there, this was a very cool board game where you built the mouse trap out of the included plastic pieces as you played, with the end goal to trigger the mouse trap. The fully assembled mouse trap was a Rube Goldberg style invention where one operation triggered the next and the next and so on, until the last step dropped a cage on a little plastic mouse. Sometimes when I'm programming and I'm reviewing a particularly complex interaction between components and objects, while tracking the flow path mentally, I say to myself "It's a Mouse Trap!" and I wonder if my early addiction to that game and others like it was portent to my becoming a programmer. Another realization I have sometimes when looking at my code is how daunted I feel at the share complexity involved, followed by a darker comedic amazement at my expectation that it will all come together and work. How about you? Did you find yourself drawn to games that at their heart featured interacting control paths when growing up? Robert.

    Read the article

< Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >