Daily Archives

Articles indexed Thursday May 6 2010

Page 15/118 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • "Best" language /architecture for browser-based app with ODBC and sockets? (subjective)

    - by mawg
    Sorry to ask a subjective question, but I would welcome some advice. I am an experienced programmer of embedded s/w, but haven't done much network programming, although I have done a fair bit of hobbyist PHP. Anyway, I have to develop what is probably a fairly general type of app, as shown in this crude diagram --------------------------------------------------------------------------------- | Browser / user interface Takes input from user form and writes data to d/b. | | Also gets data and updates browser contents when when d/b contents are changed | | because of info received over TCP/IP. | |________________________________________________________________________________| | ODBC | |_______________________________________________________________________________| | database | |_______________________________________________________________________________| | ODBC | |_______________________________________________________________________________| | Socket (TCP/IP) | | Send data out when d/b is updated from browser. | | Also, update d/b when data are received over TCP/IP. | |_______________________________________________________________________________| As I say, I imagine this to be a fairly typical architecture? Am I right? Then client is insisting on MSIE - unless I can show compelling technical reasons for FireFox or other then it will have to be MSIE (are there any compelling technical reasons?). So, with MIE (almost) a given, I had though to use PHP, since I know it, but the client seems awfully keen on Java (which ought to be OK since I am conversant with C++) it woudl seem to make sense to use the same language for the "upper" interface between the web pages (which that app generates) and the d/b, and for the "lower" interface between the d/b and the socket. (a single language means a single set of tools since text approach, etc) So, the (probably highly subjective) question is "which language shoudl I choose". As I say, the client is keen on Java. Any compelling reason why not? Is it generally a good choice for the sort of thing described here? Any other hints & tips gratefully appreciated (and up-voted): URLs, books, tool chain suggestions, etc, etc

    Read the article

  • Is there anyway I can secure my connection when I try to log in to my router remotely?

    - by HardwareMuch
    I'm trying to configure my desktop to be accessed remotely. Here's what I've done so far: enabled wake on lan / remote wake up on all interfaces. I'm using logmein as my remote desktop application. setup DDNS so that I can log in to my router. When I try to remotely log in to my router it says that it is not encrypted there anyone can see my log in information. What can I do to make this a more secure setup? Any other suggestions or different methods will be greatly appreciated.

    Read the article

  • How do you obtain a formatted date and time for the current locale in C?

    - by jwaddell
    What C function should I call to obtain a formatted date and time for the locale where the program is being executed? I'm asking this question because I have run into a problem using the ClamAV daemon API. The VERSION command returns the date and time of the latest virus definitions, but the code uses a call to ctime to format it. As far as I can tell ctime does not format the datetime according to the current locale and uses the English abbreviations for days of the week and the month in the returned string. This causes problems as my Java program which uses the ClamAV API does respect the current locale and thus expects the day of the week and month name to have the local abbreviations. The datetime format would need to be in the same format as that produced by ctime: Www Mmm dd hh:mm:ss yyyy Where Www is the weekday, Mmm the month in letters, dd the day of the month, hh:mm:ss the time, and yyyy the year. I could rewrite the Java program to always assume English dates but I'd be happier to submit a patch to ClamAV as it seems like a bug on their side to me.

    Read the article

  • Any techniques to interrupt, kill, or otherwise unwind (releasing synchronization locks) a single de

    - by gojomo
    I have a long-running process where, due to a bug, a trivial/expendable thread is deadlocked with a thread which I would like to continue, so that it can perform some final reporting that would be hard to reproduce in another way. Of course, fixing the bug for future runs is the proper ultimate resolution. Of course, any such forced interrupt/kill/stop of any thread is inherently unsafe and likely to cause other unpredictable inconsistencies. (I'm familiar with all the standard warnings and the reasons for them.) But still, since the only alternative is to kill the JVM process and go through a more lengthy procedure which would result in a less-complete final report, messy/deprecated/dangerous/risky/one-time techniques are exactly what I'd like to try. The JVM is Sun's 1.6.0_16 64-bit on Ubuntu, and the expendable thread is waiting-to-lock an object monitor. Can an OS signal directed to an exact thread create an InterruptedException in the expendable thread? Could attaching with gdb, and directly tampering with JVM data or calling JVM procedures allow a forced-release of the object monitor held by the expendable thread? Would a Thread.interrupt() from another thread generate a InterruptedException from the waiting-to-lock frame? (With some effort, I can inject an arbitrary beanshell script into the running system.) Can the deprecated Thread.stop() be sent via JMX or any other remote-injection method? Any ideas appreciated, the more 'dangerous', the better! And, if your suggestion has worked in personal experience in a similar situation, the best!

    Read the article

  • Configure ELMAH without having to modify web.config except for httpmodules and httphandler

    - by ggonsalv
    I want to create seperate config (for example elmah.config) with just <configSections> <sectionGroup name="elmah"> <section name="errorLog" type="Elmah.ErrorLogSectionHandler, Elmah" /> </sectionGroup> </configSections> <elmah> <errorLog type="Elmah.SqlErrorLog,Elmah" connectionString="....." /> </elmah> I know I will have to add the handler and httpmodule sections to plug-in to ASP.Net 1.1 I just want to seperate out the above portion. Also it is archaic .Net 1.1 so bear with me ...

    Read the article

  • Second choice font in HTML

    - by Amar Ravikumar
    This might be slightly basic. Sorry for that but I was wondering if it is possible that the second choice font we specify in HTML (using font/font-family) can be of a different font-size. Eg. Use Lucida Grande, size 13 or Arial, size 14 if that wasn't found

    Read the article

  • Grouping in datagrid - rows not getting displayed

    - by Archie
    Hello, I have to group the data int the datagrid. I have done following for that: Have added the style to resources as: > <Style x:Key="GroupHeaderStyle" > TargetType="{x:Type GroupItem}"> > <Setter Property="Template"> > <Setter.Value> > <ControlTemplate TargetType="{x:Type GroupItem}"> > <Expander IsExpanded="False" > > > <Expander.Header> > <TextBlock Text="{Binding Name}"/> > </Expander.Header> > <ItemsPresenter /> > </Expander> > </ControlTemplate> > </Setter.Value> > </Setter> > </Style> I have applied the style as: <dg:DataGrid Grid.Row="1" Name="dgAuthor" HorizontalScrollBarVisibility="Hidden" AutoGenerateColumns="False" RowHeaderWidth="17" RowHeight="25"> <dg:DataGrid.GroupStyle> <GroupStyle ContainerStyle="{StaticResource GroupHeaderStyle}"> <GroupStyle.Panel> <ItemsPanelTemplate> <dg:DataGridRowsPresenter/> </ItemsPanelTemplate> </GroupStyle.Panel> </GroupStyle> </dg:DataGrid.GroupStyle> </dg:DataGrid> I have infoList as a ObservableCollection and have assigned it as itemssource as follows: ListCollectionView lcv = new ListCollectionView(infoList); lcv.GroupDescriptions.Add(new PropertyGroupDescription("Author")); dgAuthor.ItemsSource = lcv; where Info is class which has Author,Book,Year properties. I have to group the datagrid on Author property. I am able to display the explander but cannot see any rows in it. Can anybody tell me whats wrong with the code?

    Read the article

  • Javascript conversion, from Prototype to jQuery

    - by moshimoshi
    Hi, I would like to update the following javascript code based on Prototype framework to jQuery framework: Event.observe(window, 'load', function() { $$('.piece').each(function(item) { new Draggable(item, { revert: true } ); }); $$('.cell').each(function(item) { Droppables.add(item, { accept: 'piece', onDrop: function(piece, cell) { cell.descendants().each(function(item) { item.remove(); } ); piece.remove(); piece.setStyle({ 'top': null, 'left': null }); new Draggable(piece, { revert: true }); cell.appendChild(piece); } }); }); }); The first part of the script is easy to convert: $(function() { $('.piece').draggable( { evert: true } ); $('.cell').droppable( { /* But here, it's more difficult. Right? ;) ... */ } }); }); Have you got an idea? Any part of code is welcome. Thanks a lot.

    Read the article

  • How to create a view to manage associations between HABTM models? (Rails)

    - by Chris Hart
    Hello, I am using Ruby on Rails and need to create a view that allows the creation of records through a HABTM relationship to another model. Specifically, I have the following models: Customer and ServiceOverride, and a join table customers_serviceoverrides. Using the customer view for create/update, I need to be able to create, update and delete ServiceOverrides and manage the attributes of the associated model(s) from the same view. Visually I'd prefer to have something like a plus/minus sign to add/delete service overrides, and each serviceoverride record has two string entities which need to be displayed and editable as well. However, if I could just get the code (a kind of nested form, I'm assuming?) working, I could work out the UI aspects. The models are pretty simple: class ServiceOverride < ActiveRecord::Base has_and_belongs_to_many :customers end class Customer < ActiveRecord::Base has_and_belongs_to_many :serviceoverrides end The closest thing I've found explaining this online is on this blog but it doesn't really address what I'm trying to do (both manage the linkages to the other model, and edit attributes of that model. Any help is appreciated. Thanks in advance. Chris

    Read the article

  • Blackberry - Listfield layout question

    - by Kai
    I'm having an interesting anomaly when displaying a listfield on the blackberry simulator: The top item is the height of a single line of text (about 12 pixels) while the rest are fine. Does anyone know why only the top item is being drawn this way? Also, when I add an empty venue in position 0, it still displays the first actual venue this way (item in position 1). Not sure what to do. Thanks for any help. The layout looks like this: ----------------------------------- | *part of image* | title | ----------------------------------- | | title | | * full image * | address | | | city, zip | ----------------------------------- The object is called like so: listField = new ListField( venueList.size() ); listField.setCallback( this ); listField.setSelectedIndex(-1); _middle.add( listField ); Here is the drawListRow code: public void drawListRow( ListField listField, Graphics graphics, int index, int y, int width ) { listField.setRowHeight(90); Hashtable item = (Hashtable) venueList.elementAt( index ); String venue_name = (String) item.get("name"); String image_url = (String) item.get("image_url"); String address = (String) item.get("address"); String city = (String) item.get("city"); String zip = (String) item.get("zip"); EncodedImage img = null; try { String filename = image_url.substring(image_url.indexOf("crop/") + 5, image_url.length() ); FileConnection fconn = (FileConnection)Connector.open( "file:///SDCard/Blackberry/project1/" + filename, Connector.READ); if ( !fconn.exists() ) { } else { InputStream input = fconn.openInputStream(); byte[] data = new byte[(int)fconn.fileSize()]; input.read(data); input.close(); if(data.length > 0) { EncodedImage rawimg = EncodedImage.createEncodedImage( data, 0, data.length); int dw = Fixed32.toFP(Display.getWidth()); int iw = Fixed32.toFP(rawimg.getWidth()); int sf = Fixed32.div(iw, dw); img = rawimg.scaleImage32(sf * 4, sf * 4); } else { } } } catch(IOException ef) { } graphics.drawText( venue_name, 140, y, 0, width ); graphics.drawText( address, 140, y + 15, 0, width ); graphics.drawText( city + ", " + zip, 140, y + 30, 0, width ); if(img != null) { graphics.drawImage(0, y, img.getWidth(), img.getHeight(), img, 0, 0, 0); } }

    Read the article

  • Rotate a feature programatically Open Layers

    - by Ozaki
    TLDR I want to rotate a Feature in my open layers. I want it to face a certain heading that I am receiving from server. I know that you can make a feature spin on a point or so on: window.setInterval(function() {rotateFeature( pointFeature, 360 / 20, origin)}, 100); as from the open layers example. But I want to be able to face it towards a heading I am given, so. Can I face a feature towards a heading? Can I face a feature(image) in the same way? If not is it possible to automatically calculate the rotation required and position it that way? Or any ideas on how I could do this with the image? (hoping not to have 360 images) Thanks in advance.

    Read the article

  • Silverlight DRY when animating multiple UserControls on main Navigation page.

    - by Tobias op den Brouw
    Hello all. Starting with Silverlight development. Yet to read a good Silverlight book: suggestions welcome. I have a main GUI screen where 7 user controls (menu items) 'swoop' into sight, all along their own path. I have the user controls nicely seperated and behaving well. Having multiple storyboards (1 each for each menuitem) with multiple keyframe animations (X,Y,height, width) in one .XAML is not sitting well with me. Repeating all those property values is hideous, neverthemind maintenance. I've tried to move values into the app.xaml and set animation durations with style keys, but having limited success. Can anyone suggest a nice way of making this cleaner? Refactor the storyboards out to their own control? Property values in resources? Dynamic building in codebehind? Referring me to a how-to site is fine as well. Tx!

    Read the article

  • IIS Active Directory double handshake hickup

    - by AngryHacker
    I have a .net 2.0 click-once application that connects to IIS web services on Windows 2003 R2 64-bits. The IIS is setup with Integrated Windows Authentication. So whenever a web service call is made to IIS web services, there is a double handshake taking place: Client Request #1 GetEmployeeList Server Response #1 <- 401 HTTP/1.1 401 Unauthorized WWW-Authenticate: Negotiate WWW-Authenticate: NTLM Client Request #2 REQUEST Header... Server Response #2 <- 200 Data Received Lately, however, Server Response #1 will sometimes (a good 20 percent of the calls) take a massive amount of time (like 25 to 30 seconds). How do I debug this problem? Is this a Active Directory problem or a Domain Controller problem?

    Read the article

  • disown a process in ksh

    - by fahdshariff
    The "disown" command works in bash, but not in ksh. If I have started a process in ksh, how can I "disown" it, so I can exit my shell. (I know about nohup, but the process has already started!)

    Read the article

  • Template Child Class Overriding a Parent Class's Virtual Function

    - by user334066
    The below code compiles with gcc v4.3.3 and the templated child class seems to be overriding a virtual function in the parent, but doesn't that break the rule that you cannot have a virtual template function? Or is something else happening that I don't understand? class BaseClass { public: virtual void Func(int var) { std::cout<<"Base int "<<var<<std::endl; } virtual void Func(double var) { std::cout<<"Base double "<<var<<std::endl; } }; template <class TT> class TemplateClass : public BaseClass { public: using BaseClass::Func; virtual void Func(TT var) { std::cout<<"Child TT "<<var<<std::endl; } }; int main(int argc, char **argv) { BaseClass a; TemplateClass<int> b; BaseClass *c = new TemplateClass<int>; int intVar = 3; double doubleVar = 5.5; a.Func(intVar); a.Func(doubleVar); b.Func(intVar); b.Func(doubleVar); c->Func(intVar); c->Func(doubleVar); delete c; } This then outputs: Base int 3 Base double 5.5 Child TT 3 Base double 5.5 Child TT 3 Base double 5.5 as I hoped, but I'm not sure why it works.

    Read the article

  • Umbraco on Windows 7 64-bit

    - by HeavyWave
    I'm trying to install Umbraco CMS on Windows 7 64-bit and I get the following exception: [HttpException (0x80004005): Could not load file or assembly 'ImageManipulation, Version=1.0.2105.41209, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission required. The application pool's trust mode is set to 'Full', all the user permissions are just as on other sites hosted on the same machine. I went through all relevant topics on Umbraco's forum, but all advices are about the trust level. How do I fix this?

    Read the article

  • Windows XP Home Edition SP3 cant recognise PCMIA SD Card

    - by Pozo
    System Specifications: Laptop : Dell Inspiron 6000 OS: Windows Home Edition SP3 SD Adapter: Hagiwara Smart Media Adapter I inserted the card into the slot, windows xp recognises the device, lists the pcmia controller on the device manager list, an entry appears under the IDE ATA/ATAPI category on the device manager as well. However, the device does not show under my computer and the driver does not get assigned a letter number. I checked the system logs from the device manager and there were no logged errors. Checking the Hagiwara support website, the manufacturer indicates that the adapter driver is the same as the windows xp pcmia controller. Checking Dell's website, no specific drivers were listed for that either. General Search on the web indicates that multiple people face similar problems with their SD cards, yet none actually spell out the route issue that causes this. Please let me know if you have any suggestions for further debugging. Thanks in advance

    Read the article

  • WMII Terminal Width of 80 Columns for xterm (colrules)

    - by BCable
    I'm trying to get WMII to split horizontally at 80 columns for xterm, but I'm only seeing a way to do this via percentage. It would be nice to be able to set it by something other than percentage for various resolutions, but if I have to deal with that I will. The problem is that even percentages don't work at my resolution (1366x768). 47+47 in /colrules yields 79 characters and 48+48 yields 81 characters. As far as I can tell, there is no decimal system allowed so I could do 47.5 for instance. I came from Ion3 and I'm used to using 80 column terminals, resizable by the keyboard, to get a reasonable cut off point for VIM when I'm coding. I would just settle with using the mouse, but WMII seems to be much more fluid than Ion3, so I would have to do it a LOT, which sounds annoying. Any ideas?

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >