Search Results

Search found 1640 results on 66 pages for 'daniel beck'.

Page 41/66 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • Misalignement in the output Bitmap created from a byte array

    - by Daniel
    I am trying to understand why I have troubles creating a Bitmap from a byte array. I post this after a careful scrutiny of the existing posts about Bitmap creation from byte arrays, like the followings: Creating a bitmap from a byte[], Working with Image and Bitmap in c#?, C#: Bitmap Creation using bytes array My code is aimed to execute a filter on a digital image 8bppIndexed writing the pixel value on a byte [] buffer to be converted again (after some processing to manage gray levels) in a 8BppIndexed Bitmap My input image is a trivial image created by means of specific perl code: https://www.box.com/shared/zqt46c4pcvmxhc92i7ct Of course, after executing the filter the output image has lost the first and last rows and the first and last columns, due to the way the filter manage borders, so from the original 256 x 256 image i get a 254 x 254 image. Just to stay focused on the issue I have commented the code responsible for executing the filter so that the operation really performed is an obvious: ComputedPixel = InputImage.GetPixel(myColumn, myRow).R; I know, i should use lock and unlock but I prefer one headache one by one. Anyway this code should be a sort of identity transform, and at last i use: private unsafe void FillOutputImage() { OutputImage = new Bitmap (OutputImageCols, OutputImageRows , PixelFormat .Format8bppIndexed); ColorPalette ncp = OutputImage.Palette; for (int i = 0; i < 256; i++) ncp.Entries[i] = Color .FromArgb(255, i, i, i); OutputImage.Palette = ncp; Rectangle area = new Rectangle(0, 0, OutputImageCols, OutputImageRows); var data = OutputImage.LockBits(area, ImageLockMode.WriteOnly, OutputImage.PixelFormat); Marshal .Copy (byteBuffer, 0, data.Scan0, byteBuffer.Length); OutputImage.UnlockBits(data); } The output image I get is the following: https://www.box.com/shared/p6tubyi6dsf7cyregg9e It is quite clear that I am losing a pixel per row, but i cannot understand why: I have carefully controlled all the parameters: OutputImageCols, OutputImageRows and the byte [] byteBuffer length and content even writing known values as way to test. The code is nearly identical to other code posted in stackOverflow and elsewhere. Someone maybe could help to identify where the problem is? Thanks a lot

    Read the article

  • nfs (netapp) question: how to map the device shown in sar -d to the data volume?

    - by Daniel
    Using sar I can see device nfss24 is very busy, but how to know which data volume (file system) the device is for? sar -d 1 10|egrep "busy|nfs" SunOS phxdbnfs11 5.10 Generic_141414-07 sun4v 04/14/2010 19:03:27 device %busy avque r+w/s blks/s avwait avserv 19:03:28 nfs23 0 0.0 0 0 0.0 0.0 nfs24 100 1484053.4 504 32123 2944300.0 47.5 nfs25 0 0.0 0 0 0.0 0.0 nfs26 0 0.0 0 0 0.0 0.0 nfs27 107 1.1 0 0 0.0 0.0 nfs28 107 17.0 0 0 0.0 0.0 nfs29 100 13109.5 460 29435 28451.7 52.0 nfs30 0 0.0 0 0 0.0 0.0 nfs31 107 9.6 0 0 0.0 0.0 nfs32 0 0.0 0 0 0.0 0.0 nfs33 107 1.1 0 0 0.0 0.0 19:03:29 nfs23 0 0.0 0 0 0.0 0.0 nfs24 100 1483762.8 530 33709 2797054.5 45.1 nfs25 0 0.0 0 0 0.0 0.0 nfs26 0 0.0 0 0 0.0 0.0 nfs27 107 1.1 0 0 0.0 0.0 nfs28 107 17.0 0 0 0.0 0.0 nfs29 100 12800.8 511 32732 25016.0 46.8 nfs30 0 0.0 0 0 0.0 0.0 nfs31 107 9.6 0 0 0.0 0.0 nfs32 0 0.0 0 0 0.0 0.0 nfs33 107 1.1 0 0 0.0 0.0 19:03:30 nfs23 0 0.0 0 0 0.0 0.0 nfs24 100 1483080.4 761 48162 1950073.8 31.4 nfs25 0 0.0 0 0 0.0 0.0 nfs26 0 0.0 0 0 0.0 0.0 nfs27 107 1.1 0 0 0.0 0.0 nfs28 107 17.0 0 0 0.0 0.0 nfs29 100 12406.7 737 46855 16800.7 32.4 nfs30 0 0.0 0 0 0.0 0.0 nfs31 107 9.6 0 0 0.0 0.0 nfs32 0 0.0 0 0 0.0 0.0 nfs33 107 1.1 0 0 0.0 0.0

    Read the article

  • Server is on or off

    - by Daniel
    Curious. I'm starting to broadcast high school football games online, and it uses a program to broadcast the feeds off my computer. However, when I shut the program down or the computer down, the server goes offline and guests won't be able to access the feeds. Is there any kind of code out there that I can post onto my website that will indicate to my guests whether the server is on or off? I would figure it would be a simple code, a php script or something that periodically checks to see if a site is on line and then displays ON or OFF.

    Read the article

  • Detecting whether user stayed after prompting onBeforeUnload

    - by Daniel Magliola
    In a web app I'm working on, I'm capturing onBeforeUnload to ask the user whether he really wants to exit. Now, if he decides to stay, there are a number of things I'd like to do. What I'm trying to figure out is that he actually chose to stay. I can of course declare a SetTimeout for "x" seconds, and if that fires, then it would mean the user is still there (because we didn't get unloaded). The problem is that the user can take any time to decide whether to stay or not... I was first hoping that while the dialog was showing, SetTimeout calls would not fire, so I could set a timeout for a short time and it'd only fire if the user chose to stay. However, timeouts do fire while the dialog is shown, so that doesn't work. Another idea I tried is capturing mouseMoves on the window/document. While the dialog is shown, mouseMoves indeed don't fire, except for one weird exception that really applies to my case, so that won't work either. Can anyone think of other way to do this? Thanks! (In case you're curious, the reason capturing mouseMove doesn't work is that I have an IFrame in my page, containing a site from another domain. If at the time of unloading the page, the focus is within the IFrame, while the dialog shows, then I get the MouseMove event firing ONCE when the mouse moves from inside the IFrame to the outside (at least in Firefox). That's probably a bug, but still, it's very likely that'll happen in our case, so I can't use this method).

    Read the article

  • Sql query listing Fathers and childs with joins, how to distinct them?

    - by DaNieL
    Having those tables: table_n1: | t1_id | t1_name | | 1 | foo | table_n2: | t2_id | t1_id | t2_name | | 1 | 1 | bar | I need a query that gives me two result: | names | | foo | | foo / bar | But i cant figure out the right way. I wrote this one: SELECT CONCAT_WS(' / ', table_n1.t1_name, table_n2.t2_name) AS names FROM table_n1 LEFT JOIN table_n2 ON table_n2.t1_id = table_n1.t1_id that works for an half: this only return the 2° row (in the example above): | names | | foo - bar | This query return the 'father' (table_n1) name only when it doesnt have 'childs' (table_n2). How can i fix it?

    Read the article

  • snippet generation in php

    - by daniel
    Hi, I have a long chunk of text that came back from a search query. I'd like to display a snippet of the text, not the entire thing, and highlight the search query within the snippet. I realize that decided what part of the text to slice can be complicated, and I was hoping for any ideas on how do to this? Thanks!

    Read the article

  • PHP session permission problem

    - by Daniel
    Hi I'm trying to initialize a session but i get this error: Warning: session_start() [function.session-start]: open(/tmp/sess_7af3ee9ec1350680bedcf63833d160bd, O_RDWR) failed: Permission denied (13) The session.path is set to /tmp with 777 perms. I try to edit the session.path to "0;777;/tmp" but the session files are created with the wrong permissions(only write). I'm using PHP 5.2 on apache2 and ubuntu 9.10. Any ideas?

    Read the article

  • Why does the rename() syscall prohibit moving a directory that I can't write to a different director

    - by Daniel Papasian
    I am trying to understand why this design decision was made with the rename() syscall in 4.2BSD. There's nothing I'm trying to solve here, just understand the rationale for the behavior itself. 4.2BSD saw the introduction of the rename() syscall for the purpose of allowing atomic renames/moves of files. From 4.3BSD-Reno/src/sys/ufs/ufs_vnops.c: /* * If ".." must be changed (ie the directory gets a new * parent) then the source directory must not be in the * directory heirarchy above the target, as this would * orphan everything below the source directory. Also * the user must have write permission in the source so * as to be able to change "..". We must repeat the call * to namei, as the parent directory is unlocked by the * call to checkpath(). */ if (oldparent != dp->i_number) newparent = dp->i_number; if (doingdirectory && newparent) { VOP_LOCK(fndp->ni_vp); error = ufs_access(fndp->ni_vp, VWRITE, tndp->ni_cred); VOP_UNLOCK(fndp->ni_vp); So clearly this check was added intentionally. My question is - why? Is this behavior supposed to be intuitive? The effect of this is that one cannot move a directory (located in a directory that one can write) that one cannot write to another directory that one can write to atomically. You can, however, create a new directory, move the links over (assuming one has read access to the directory), and then remove one's write bit on the directory. You just can't do so atomically. % cd /tmp % mkdir stackoverflow-question % cd stackoverflow-question % mkdir directory-1 % mkdir directory-2 % mkdir directory-1/directory-i-cant-write % echo "foo" > directory-1/directory-i-cant-write/contents % chmod 000 directory-1/directory-i-cant-write/contents % chmod 000 directory-1/directory-i-cant-write % mv directory-1/directory-i-cant-write directory-2 mv: rename directory-1/directory-i-cant-write to directory-2/directory-i-cant-write: Permission denied We now have a directory I can't write with contents I can't read that I can't move atomically. I can, however, achieve the same effect non-atomically by changing permissions, making the new directory, using ln to create the new links, and changing permissions. (Left as an exercise to the reader) . and .. are special cased already, so I don't particularly buy that it is intuitive that if I can't write a directory I can't "change .." which is what the source suggests. Is there any reason for this besides it being the perceived correct behavior by the author of the code? Is there anything bad that can happen if we let people atomically move directories (that they can't write) between directories that they can write?

    Read the article

  • Performing Aggregate Functions on Multi-Million Row Tables

    - by Daniel Short
    I'm having some serious performance issues with a multi-million row table that I feel I should be able to get results from fairly quick. Here's a run down of what I have, how I'm querying it, and how long it's taking: I'm running SQL Server 2008 Standard, so Partitioning isn't currently an option I'm attempting to aggregate all views for all inventory for a specific account over the last 30 days. All views are stored in the following table: CREATE TABLE [dbo].[LogInvSearches_Daily]( [ID] [bigint] IDENTITY(1,1) NOT NULL, [Inv_ID] [int] NOT NULL, [Site_ID] [int] NOT NULL, [LogCount] [int] NOT NULL, [LogDay] [smalldatetime] NOT NULL, CONSTRAINT [PK_LogInvSearches_Daily] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY] ) ON [PRIMARY] This table has 132,000,000 records, and is over 4 gigs. A sample of 10 rows from the table: ID Inv_ID Site_ID LogCount LogDay -------------------- ----------- ----------- ----------- ----------------------- 1 486752 48 14 2009-07-21 00:00:00 2 119314 51 16 2009-07-21 00:00:00 3 313678 48 25 2009-07-21 00:00:00 4 298863 0 1 2009-07-21 00:00:00 5 119996 0 2 2009-07-21 00:00:00 6 463777 534 7 2009-07-21 00:00:00 7 339976 503 2 2009-07-21 00:00:00 8 333501 570 4 2009-07-21 00:00:00 9 453955 0 12 2009-07-21 00:00:00 10 443291 0 4 2009-07-21 00:00:00 (10 row(s) affected) I have the following index on LogInvSearches_Daily: /****** Object: Index [IX_LogInvSearches_Daily_LogDay] Script Date: 05/12/2010 11:08:22 ******/ CREATE NONCLUSTERED INDEX [IX_LogInvSearches_Daily_LogDay] ON [dbo].[LogInvSearches_Daily] ( [LogDay] ASC ) INCLUDE ( [Inv_ID], [LogCount]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] I need to pull inventory only from the Inventory for a specific account id. I have an index on the Inventory as well. I'm using the following query to aggregate the data and give me the top 5 records. This query is currently taking 24 seconds to return the 5 rows: StmtText ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- SELECT TOP 5 Sum(LogCount) AS Views , DENSE_RANK() OVER(ORDER BY Sum(LogCount) DESC, Inv_ID DESC) AS Rank , Inv_ID FROM LogInvSearches_Daily D (NOLOCK) WHERE LogDay DateAdd(d, -30, getdate()) AND EXISTS( SELECT NULL FROM propertyControlCenter.dbo.Inventory (NOLOCK) WHERE Acct_ID = 18731 AND Inv_ID = D.Inv_ID ) GROUP BY Inv_ID (1 row(s) affected) StmtText ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |--Top(TOP EXPRESSION:((5))) |--Sequence Project(DEFINE:([Expr1007]=dense_rank)) |--Segment |--Segment |--Sort(ORDER BY:([Expr1006] DESC, [D].[Inv_ID] DESC)) |--Stream Aggregate(GROUP BY:([D].[Inv_ID]) DEFINE:([Expr1006]=SUM([LOALogs].[dbo].[LogInvSearches_Daily].[LogCount] as [D].[LogCount]))) |--Sort(ORDER BY:([D].[Inv_ID] ASC)) |--Nested Loops(Inner Join, OUTER REFERENCES:([D].[Inv_ID])) |--Nested Loops(Inner Join, OUTER REFERENCES:([Expr1011], [Expr1012], [Expr1010])) | |--Compute Scalar(DEFINE:(([Expr1011],[Expr1012],[Expr1010])=GetRangeWithMismatchedTypes(dateadd(day,(-30),getdate()),NULL,(6)))) | | |--Constant Scan | |--Index Seek(OBJECT:([LOALogs].[dbo].[LogInvSearches_Daily].[IX_LogInvSearches_Daily_LogDay] AS [D]), SEEK:([D].[LogDay] > [Expr1011] AND [D].[LogDay] < [Expr1012]) ORDERED FORWARD) |--Index Seek(OBJECT:([propertyControlCenter].[dbo].[Inventory].[IX_Inventory_Acct_ID]), SEEK:([propertyControlCenter].[dbo].[Inventory].[Acct_ID]=(18731) AND [propertyControlCenter].[dbo].[Inventory].[Inv_ID]=[LOA (13 row(s) affected) I tried using a CTE to pick up the rows first and aggregate them, but that didn't run any faster, and gives me essentially the same execution plan. (1 row(s) affected) StmtText ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --SET SHOWPLAN_TEXT ON; WITH getSearches AS ( SELECT LogCount -- , DENSE_RANK() OVER(ORDER BY Sum(LogCount) DESC, Inv_ID DESC) AS Rank , D.Inv_ID FROM LogInvSearches_Daily D (NOLOCK) INNER JOIN propertyControlCenter.dbo.Inventory I (NOLOCK) ON Acct_ID = 18731 AND I.Inv_ID = D.Inv_ID WHERE LogDay DateAdd(d, -30, getdate()) -- GROUP BY Inv_ID ) SELECT Sum(LogCount) AS Views, Inv_ID FROM getSearches GROUP BY Inv_ID (1 row(s) affected) StmtText ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |--Stream Aggregate(GROUP BY:([D].[Inv_ID]) DEFINE:([Expr1004]=SUM([LOALogs].[dbo].[LogInvSearches_Daily].[LogCount] as [D].[LogCount]))) |--Sort(ORDER BY:([D].[Inv_ID] ASC)) |--Nested Loops(Inner Join, OUTER REFERENCES:([D].[Inv_ID])) |--Nested Loops(Inner Join, OUTER REFERENCES:([Expr1008], [Expr1009], [Expr1007])) | |--Compute Scalar(DEFINE:(([Expr1008],[Expr1009],[Expr1007])=GetRangeWithMismatchedTypes(dateadd(day,(-30),getdate()),NULL,(6)))) | | |--Constant Scan | |--Index Seek(OBJECT:([LOALogs].[dbo].[LogInvSearches_Daily].[IX_LogInvSearches_Daily_LogDay] AS [D]), SEEK:([D].[LogDay] > [Expr1008] AND [D].[LogDay] < [Expr1009]) ORDERED FORWARD) |--Index Seek(OBJECT:([propertyControlCenter].[dbo].[Inventory].[IX_Inventory_Acct_ID] AS [I]), SEEK:([I].[Acct_ID]=(18731) AND [I].[Inv_ID]=[LOALogs].[dbo].[LogInvSearches_Daily].[Inv_ID] as [D].[Inv_ID]) ORDERED FORWARD) (8 row(s) affected) (1 row(s) affected) So given that I'm getting good Index Seeks in my execution plan, what can I do to get this running faster? Thanks, Dan

    Read the article

  • How to enable i18n from within setup_app in websetup.py ?

    - by daniel
    From within the setup_app function (websetup.py) of a pylons i18n application, which is making use of a db, I was trying to initiate multilingual content to be inserted into the db. To do so the idea was something like: necessary imports here def setup_app(command, conf, vars): .... for lang in langs: set_lang(lang) content=model.Content() content.content=_('content') Session.add(content) Session.commit() Unfortunately it seems that it doesn't work. the set_lang code line is firing an exception as follows: File ".. i18n/translation.py", line 179, in set_lang translator = _get_translator(lang, **kwargs) File ".. i18n/translation.py", line 160, in _get_translator localedir = os.path.join(rootdir, 'i18n') File ".. /posixpath.py", line 67, in join elif path == '' or path.endswith('/'): AttributeError: 'NoneType' object has no attribute 'endswith' Actually I'm even not sure it could be possible launching i18n mechanisms from within this setup_app function without an active request object. Anyone has tried some trick on a similar story ?

    Read the article

  • Unique JQuery Events for a Class

    - by Daniel Macias
    I am trying to create a class that can send a unique jQuery event. Example: function Bomb(id) { this.evnt = $.Event("BOOM!_" + id); this.detonate = function() { $(document).trigger(evnt); }; } var firecracker = new Bomb(); var nuclearbomb = new Bomb(); $(document).bind(firecracker.evnt.type, function(){ // It's the fourth of july!!! }); $(document).bind(nuclearbomb.evnt.type, function(){ // We're dead }); firecracker.detonate(); nuclearbomb.detonate(); How can I create a unique event within the Bomb class without having to pass in an ID to create a unique event string for the class?

    Read the article

  • Direct show video renderers suck?

    - by Daniel
    So I've been looking into the world of media playback for windows and I've started making a C# Media Player using DirectShow. I started off using the VRM-7 windowed video renderer and it was brilliant except it had a couple of small problems (multi monitors, fullscreen). But after some research I found that it's deprecated and I should be using VRM9. So I changed it to use VRM9 windowless then found out that was an old post rofl _< so finally I'm using Vista/Win7 (or XP .net 3) Enhanced Video Renderer (EVR) which is apparently the most up to date Microsoft video renderer and has all the flashy performance/quality things added to it. (tbh I haven't noticed any difference but maybe I need a blue-ray or HQ video to notice it). With using EVR everything is working fine except resizing the video. Its really laggy/choppy/teary and problem something to do with its frame queueing mechanism. To demonstrate my problem open up windows media player classic. View - Options - Playback - output Chose the "EVR" DirectShow Video renderer Now restart wmp class and play a video, while it's playing click and drag a corner to resize it. You'll notice its horribly laggy. This is the exact same problem i am having. But if you chose "EVR Custom Pres. *" or EVR Sync *" resizing works beautifully! So i tried googling around for anything about EVR resizing issues and how to fix it but i couldn't believe how little i could find. I'm guessing "Custom Pres." stands for "Custom Presenter" which sounds like they made their own. Also you'll notice on the right hand size when you swap between EVR and the other EVR's the Resizer drop down on the right greys out. So basically I wan't to know how I can fix this retarded resizing problem and is there any decent documentation out there? There is a fair bit for VMR7/9 but not much for EVR. I downloaded the DirectX SDK which apparently has samples but it was a waste of 500mb of bandwidth as it had nothing relevant. Perhaps there is some way to force it not queueing up frames if that is the problem? If you want code say the word and I'll paste some in. But it's really quite simple and nothing much happens, i'm convinced it's a problem with the EVR renderer. EDIT: Oh and one other thing, what does VLC use? If you go into vlc options and change the renderer to anything but default, they all suck. So is it using VMR7? Or its own?

    Read the article

  • Ruby in DOS CLI, How to do?

    - by Daniel
    I see in a lot of the tutorials and how to pages, they use the following, or something similar ruby C:\test.rb Which would parse test.rb to the interpreter and ... execute the script. But how is this done a on a windows? Ruby isn't a recognized internal command (as per the DOS output)? I know how to do all these things on Linux, and its as simple as... alas Windows is completely confusing at times :)

    Read the article

  • JNI - GetObjectField returns NULL

    - by Daniel
    I'm currently working on Mangler's Android implementation. I have a java class that looks like so: public class VentriloEventData { public short type; public class _pcm { public int length; public short send_type; public int rate; public byte channels; }; _pcm pcm; } The signature for my pcm object: $ javap -s -p VentriloEventData ... org.mangler.VentriloEventData$_pcm pcm; Signature: Lorg/mangler/VentriloEventData$_pcm; I am implementing a native JNI function called getevent, which will write to the fields in an instance of the VentriloEventData class. For what it's worth, it's defined and called in Java like so: public static native int getevent(VentriloEventData data); VentriloEventData data = new VentriloEventData(); getevent(data); And my JNI implementation of getevent: JNIEXPORT jint JNICALL Java_org_mangler_VentriloInterface_getevent(JNIEnv* env, jobject obj, jobject eventdata) { v3_event *ev = v3_get_event(V3_BLOCK); if(ev != NULL) { jclass event_class = (*env)->GetObjectClass(env, eventdata); // Event type. jfieldID type_field = (*env)->GetFieldID(env, event_class, "type", "S"); (*env)->SetShortField( env, eventdata, type_field, 1234 ); // Get PCM class. jfieldID pcm_field = (*env)->GetFieldID(env, event_class, "pcm", "Lorg/mangler/VentriloEventData$_pcm;"); jobject pcm = (*env)->GetObjectField( env, eventdata, pcm_field ); jclass pcm_class = (*env)->GetObjectClass(env, pcm); // Set PCM fields. jfieldID pcm_length_field = (*env)->GetFieldID(env, pcm_class, "length", "I"); (*env)->SetIntField( env, pcm, pcm_length_field, 1337 ); free(ev); } return 0; } The code above works fine for writing into the type field (that is not wrapped by the _pcm class). Once getevent is called, data.type is verified to be 1234 at the java side :) My problem is that the assertion "pcm != NULL" will fail. Note that pcm_field != NULL, which probably indicates that the signature to that field is correct... so there must be something wrong with my call to GetObjectField. It looks fine though if I compare it to the official JNI docs. Been bashing my head on this problem for the past 2 hours and I'm getting a little desperate.. hoping a different perspective will help me out on this one.

    Read the article

  • Which is better? OpenCyc or ConceptNet?

    - by Daniel Loureiro
    Hi, I'm doing a NLP project where I need to recognise concepts in sentences to find other similar concepts. I do this to infer word valences from a list I already have. I started using WordNet, but it gave many contradictory results. By contradictory results I mean word expansions that had contradictory valences. So now I'm looking into ConceptNet and OpenCyc. I've already implemented ConceptNet and it was all very easy and I love it. Problem is that OpenCyc appears to have a much larger and more logically rigid database, which is important when I found so many "contradictions" on WordNet... But I wouldn't know because I haven't tried it. Could someone tell me if it's worth going through the (considerable, for me) effort to implement OpenCyc, or is ConceptNet good enough to infer word valences? Are they that different? I'll be happy to explain myself further, if needed. Trying to keep it short for now! Thanks!

    Read the article

  • How do I disable auto-compilation of Scala source in jEdit?

    - by Daniel
    I have always liked the auto-compilation feature of jEdit with Scala sources. Now, however, I'm using "mvn scala:cc" and JavaRebel with a Lift project, which provides better compilation than what jEdit does, and I'd like to disable jEdit's auto-compilation. How do I disable auto-compilation in jEdit, of Scala sources, in particular?

    Read the article

  • What is reading source on an ebook reader like?

    - by Daniel Straight
    There are a few open source projects I would really like to read through the code of to understand better / improve on. The problem is, for me, reading for a long time on the computer screen is tedious. I would love to be able to read code while lounging around and on a screen that was better on my eyes. Has anyone ever tried reading code on an ebook reader? It seems like the e-ink would make it easy on the eyes, plus it would be portable, plus it wouldn't kill any trees. In other words, it sounds perfect, but before I drop a couple benjamins on an ebook reader, I'd like to hear if anyone else has tried this and how it went. It seems Scott Hanselman discussed using the Kindle to read code, but I wouldn't necessarily want a Kindle. Has anyone had a positive experience with some other device? I realize this is not directly about programming, but it relates directly to my ability to improve my skills. I think if a good portable reading device for code exists, it could help a lot of programmers.

    Read the article

  • ASP.NET DropDownList posting ""

    - by Daniel
    I am using ASP.NET forms version 3.5 in VB I have a dropdownlist that is filled with data from a DB with a list of countries The code for the dropdown list is <label class="ob_label"> <asp:DropDownList ID="lstCountry" runat="server" CssClass="ob_forminput"> </asp:DropDownList> Country*</label> And the code that the list is Dim selectSQL As String = "exec dbo.*******************" ' Define the ADO.NET objects. Dim con As New SqlConnection(connectionString) Dim cmd As New SqlCommand(selectSQL, con) Dim reader As SqlDataReader ' Try to open database and read information. Try con.Open() reader = cmd.ExecuteReader() ' For each item, add the author name to the displayed ' list box text, and store the unique ID in the Value property. Do While reader.Read() Dim newItem As New ListItem() newItem.Text = reader("AllSites_Countries_Name") newItem.Value = reader("AllSites_Countries_Id") CType(LoginViewCart.FindControl("lstCountry"), DropDownList).Items.Add(newItem) Loop reader.Close() CType(LoginViewCart.FindControl("lstCountry"), DropDownList).SelectedValue = 182 Catch Err As Exception Response.Redirect("~/error-on-page/") MailSender.SendMailMessage("*********************", "", "", OrangeBoxSiteId.SiteName & " Error Catcher", "<p>Error in sub FillCountry</p><p>Error on page:" & HttpContext.Current.Request.Url.AbsoluteUri & "</p><p>Error details: " & Err.Message & "</p>") Response.Redirect("~/error-on-page/") Finally con.Close() End Try When the form is submitted an error occurs which says that the string "" cannot be converted to the datatype integer. For some reason the dropdownlist is posting "" rather than the value for the selected country.

    Read the article

  • Disk-based caching of dynamic images in IIS 7

    - by Daniel Schierbeck
    I'm writing an image server which needs to handle a relatively large number of concurrent requests (~5,000). The images being served are dynamically scaled down and cropped based on per-image specifications, which are queried from a database. The number of images is rather large, so an in-memory cache isn't viable (thrashing would most definitely occur). I'm using native caching in IIS 7 to avoid hitting the ASP.NET app which generates the images on-the-fly. I've looked around, but I couldn't find a simple way to configure IIS to store the cache on-disk -- is there such an option, or would I need to roll my own? I'd rather avoid placing the generated images in a public folder, so they can be served statically, since I would prefer to invalidate the cache entries using a query parameter (last-edit time from the database,) which doesn't seem possible to reconcile with static caching. I would love to get some feedback on this!

    Read the article

  • Modify strings in Rails?

    - by Daniel O'Connor
    Hey everyone, So I'm new to Rails (teaching myself as a senior project in high school), and I'm trying to figure out how to modify these strings. Let's say someone writes the following string in a form: "you know you are a geek when" How can I automatically change it to this: "You know you are a geek when..."? I need Rails to check the case of the first letter and check for the three dots then modify the string as necessary. I've looked here, but I can't find anything that would work. Thanks a lot!

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >