Search Results

Search found 1396 results on 56 pages for 'mr skid marks'.

Page 48/56 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • ERROR: iPhone Private Frameworks "No such file or directory"

    - by WrightsCS
    I have added Private Frameworks To my project. When I build in DEVICE | RELEASE everything works fine and I am able to ldid -S the application and it successfully launches on my device. However, when trying to BUILD AND GO in Simulator, I get the error "No such file or directory" as indicated below: (I also get the error twice which is strange too.) Line Location HomeProfileViewController.h:10: error: BluetoothManager/BluetoothManager.h: No such file or directory Below are the project and build settings that I currently have, maybe someone can find a mistake and let me know, that would be awesome! PROJECT SETTINGS: PRIVATE_HEADERS_FOLDER_PATH = "/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include" PUBLIC_HEADERS_FOLDER_PATH = "/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include" USER_HEADER_SEARCH_PATHS = "/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include" OTHER_CFLAGS = "-I/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include-I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include-I/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/gcc/arm-apple-darwin9/4.0.1/include-F/System/Library/Frameworks-F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks-F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks-DMAC_OS_X_VERSION_MAX_ALLOWED=1050" TARGET BUILD SETTINGS: PRIVATE_HEADERS_FOLDER_PATH = "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks" FRAMEWORK_SEARCH_PATHS = "$(inherited) $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks" USER_HEADER_SEARCH_PATHS = "/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include/**" OTHER_CFLAGS = "-I/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include-I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include-I/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/gcc/arm-apple-darwin9/4.0.1/include-F/System/Library/Frameworks-F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks-F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks-DMAC_OS_X_VERSION_MAX_ALLOWED=1050" Note: The quotation marks in the paths aren't actually in my project, I put them in so the site will syntax them better. Cydia

    Read the article

  • Character Encoding: â??

    - by akaphenom
    I am trying to piece together the mysterious string of characters â?? I am seeing quite a bit of in our database - I am fairly sure this is a result of conversion between character encodings, but I am not completely positive. The users are able to enter text (or cut and paste) into a Ext-Js rich text editor. The data is posted to a severlet which persists it to the database, and when I view it in the database i see those strange characters... is there any way to decode these back to their original meaning, if I was able to discover the correct encoding - or is there a loss of bits or bytes that has occured through the conversion process? Users are cutting and pasting from multiple versions of MS Word and PDF. Does the encoding follow where the user copied from? Thank you website is UTF-8 We are using ms sql server 2005; SELECT serverproperty('Collation') -- Server default collation. Latin1_General_CI_AS SELECT databasepropertyex('xxxx', 'Collation') -- Database default SQL_Latin1_General_CP1_CI_AS and the column: Column_name Type Computed Length Prec Scale Nullable TrimTrailingBlanks FixedLenNullInSource Collation text varchar no -1 yes no yes SQL_Latin1_General_CP1_CI_AS The non-Unicode equivalents of the nchar, nvarchar, and ntext data types in SQL Server 2000 are listed below. When Unicode data is inserted into one of these non-Unicode data type columns through a command string (otherwise known as a "language event"), SQL Server converts the data to the data type using the code page associated with the collation of the column. When a character cannot be represented on a code page, it is replaced by a question mark (?), indicating the data has been lost. Appearance of unexpected characters or question marks in your data indicates your data has been converted from Unicode to non-Unicode at some layer, and this conversion resulted in lost characters. So this may be the root cause of the problem... and not an easy one to solve on our end.

    Read the article

  • Can't send client certificate via SslStream

    - by Jonathan
    I am doing an SSL3 handshake using an SslStream, but, in spite of my best efforts, the SslStream never sends a client certificate on my behalf. Here is the code: SSLConnection = new System.Net.Security.SslStream(SSLInOutStream, false, new System.Net.Security.RemoteCertificateValidationCallback(AlwaysValidRemoteCertificate), new System.Net.Security.LocalCertificateSelectionCallback(ChooseLocalCertificate)); X509CertificateCollection CC = new X509CertificateCollection(); CC.Add(Org.BouncyCastle.Security.DotNetUtilities.ToX509Certificate(MyLocalCertificate)); SSLConnection.AuthenticateAsClient("test", CC, System.Security.Authentication.SslProtocols.Ssl3, false); and then I have AlwaysValidRemoteCertificate just returning true, and ChooseLocalCertificate returning the zeroth element of the array. The code probably looks a little weird because the project is a little weird, but I think that is beside the point here. The SSL handshake completes. The issue is that instead of sending a certificate message on my behalf (in the handshake process), with the ASN.1 encoded certificate (MyLocalCertificate), the SslStream sends an SSL alert number 41 (no certificate) and then carries on. I know this from packet sniffing. After the handshake is completed, the SslStream marks IsAuthenticated as true, IsMutuallyAuthenticated as false, and its LocalCertificate member is null. I feel like I'm probably missing something pretty obvious here, so any ideas would be appreciated. I am a novice with SSL, and this project is off the beaten path, so I am kind of at a loss. P.S. 1: My ChooseLocalCertificate routine is called twice during the handshake, and returns a valid (as far as I can tell), non-null certificate both times. P.S. 2: SSLInOutStream is my own class, not a NetworkStream. Like I said, though, the handshake proceeds mostly normally, so I doubt this is the culprit... but who knows?

    Read the article

  • Problem with apostrophes and other special characters when using aspell in windows

    - by Loftx
    Hi there, We seem to be having a problem with the spell checker on our content management system where it marks the ve part of We’ve as a misspelling. The spellchecker uses aspell which is called from a script on the server which executes the cmd.exe and uses it to pipe a file into aspell (it's a long winded way I know, but our server side programming langauge (ColdFusion) doesn't support writing to stdin for executables). Aspell is called by executing: c:\windows\system32\cmd.exe /c type d:\path_to_file\file.txt | "C:\Program Files\Aspell\bin\aspell" --lang=en -a Where file.txt contains the text to be spelled e.g. ^Oh have We’ve (the carat is added to prevent piping problems I believe). Aspell then output: @(#) International Ispell Version 3.1.20 (but really Aspell 0.50.3) * * * & ve 62 12: vie, voe, V, v, veg, vet, Be, Ce, be, Ev, E, e, vex, VA, VI, Va, Vi, vi, we, VD, VF, VG, VJ, VP, VT, Vt, vb, vs, DE, De, Fe, GE, Ge, He, IE, Le, ME, Me, NE, Ne, OE, PE, Re, SE, Se, Te, Xe, he, me, re, ye, Ave, Eve, Ive, ave, eve, VAR, var, veer, vier, view, vow However, we have a dev site, with the same version of Aspell, and when the same file is used it outputs with no misspellings. Both servers are running Aspell 0.50.3 on Windows server 2003, but there could be other differences in configuration: @(#) International Ispell Version 3.1.20 (but really Aspell 0.50.3) I'm wondering if the problem is to do with the piping part of the process or something different in the Aspell configuration. Does anyone have any ideas? Cheers, Tom

    Read the article

  • How to manage a One-To-One and a One-To-Many of same type as unidirectional mapping?

    - by user1652438
    I'm trying to implement a model for private messages between two or more users. That means I've got two Entities: User PrivateMessage The User model shouldn't be edited, so I'm trying to set up an unidirectional relationship: @Entity (name = "User") @Table (name = "user") public class User implements Serializable { @Id String username; String password; // something like this ... } The PrivateMessage Model addresses multiple receivers and has exactly one sender. So I need something like this: @Entity (name = "PrivateMessage") @Table (name = "privateMessage") @XmlRootElement @XmlType (propOrder = {"id", "sender", "receivers", "title", "text", "date", "read"}) public class PrivateMessage implements Serializable { private static final long serialVersionUID = -9126766942868177246L; @Id @GeneratedValue private Long id; @NotNull private String title; @NotNull private String text; @NotNull @Temporal(TemporalType.TIMESTAMP) private Date date; @NotNull private boolean read; @NotNull @ElementCollection(fetch = FetchType.EAGER, targetClass = User.class) private Set<User> receivers; @NotNull @OneToOne private User sender; // and so on } The according 'privateMessage' table won't be generated and just the relationship between the PM and the many receivers is satisfied. I'm confused about this. Everytime I try to set a 'mappedBy' attribute, my IDE marks it as an error. It seems to be a problem that the User-entity isn't aware of the private message which maps it. What am I doing wrong here? I've solved some situation similar to this one, but none of those solutions will work here. Thanks in advance!

    Read the article

  • Memory mapped files and "soft" page faults. Unavoidable?

    - by Robert Oschler
    I have two applications (processes) running under Windows XP that share data via a memory mapped file. Despite all my efforts to eliminate per iteration memory allocations, I still get about 10 soft page faults per data transfer. I've tried every flag there is in CreateFileMapping() and CreateFileView() and it still happens. I'm beginning to wonder if it's just the way memory mapped files work. If anyone there knows the O/S implementation details behind memory mapped files I would appreciate comments on the following theory: If two processes share a memory mapped file and one process writes to it while another reads it, then the O/S marks the pages written to as invalid. When the other process goes to read the memory areas that now belong to invalidated pages, this causes a soft page fault (by design) and the O/S knows to reload the invalidated page. Also, the number of soft page faults is therefore directly proportional to the size of the data write. My experiments seem to bear out the above theory. When I share data I write one contiguous block of data. In other words, the entire shared memory area is overwritten each time. If I make the block bigger the number of soft page faults goes up correspondingly. So, if my theory is true, there is nothing I can do to eliminate the soft page faults short of not using memory mapped files because that is how they work (using soft page faults to maintain page consistency). What is ironic is that I chose to use a memory mapped file instead of a TCP socket connection because I thought it would be more efficient. Note, if the soft page faults are harmless please note that. I've heard that at some point if the number is excessive, the system's performance can be marred. If soft page faults intrinsically are not significantly harmful then if anyone has any guidelines as to what number per second is "excessive" I'd like to hear that. Thanks.

    Read the article

  • Determine whether a canvas has been inserted into each page

    - by Hadi Teo
    Hi, Currently i have a code which will print OMR Mark on each pages. Basically i insert a canvas into each page and subsequently an OMR Mark Line Series are inserted into the canvas. Recently i found an issue that somehow one of the canvas is placed out of a page and it appears at the previous page instead of the current page. Below is the code snippet in how i inserted canvas as well as OMR Marks into each page: ' Start Code Snippet Sub GenerateOMR() Dim ShpCanvas As Shape Dim MaxPages As Integer Dim PNo As Integer ClearOMR MaxPages = Selection.Information(wdNumberOfPagesInDocument) For PNo = 1 To MaxPages Selection.GoTo What:=wdGoToPage, Which:=wdGoToFirst, Count:=PNo, Name:="" Select Case PNo Case 1 Set ShpCanvas = ActiveDocument.Shapes.AddCanvas(0, 0.5, 600, 300) Case Else Set ShpCanvas = ActiveDocument.Shapes.AddCanvas(0, 0, 600, 300) End Select ' Add a canvas on each page With ShpCanvas .Name = "OMR_Canvas_" & CStr(PNo) .RelativeHorizontalPosition = wdRelativeHorizontalPositionPage .RelativeVerticalPosition = wdRelativeVerticalPositionPage End With ' Insert a white background rectange and remove the rectangle border line With ShpCanvas.CanvasItems.AddShape(msoShapeRectangle, 536, 0, 64, 300) .Name = "OMR_WhiteBackground_" & CStr(PNo) .Fill.ForeColor.RGB = RGB(255, 255, 255) .Line.ForeColor.RGB = RGB(255, 255, 255) End With PrintOMRPage ShpCanvas, PNo Next PNo End Sub ' End Code Snippet There is a custom method called PrintOMRPage method which is not relevant here. My question now, how do i know whether a canvas has been inserted into a page ? Basically i will loop in all the pages and check whether a canvas has been inserted into that page. Apparently i cannot find the correct way. I have tried to check using ActiveDocument.Shapes(1).Top and validate whether the Top position is a negative value. But apparently the Top position is always measured from the top of each page. Thanks for the help. hadi teo

    Read the article

  • Securely erasing a file using simple methods?

    - by Jason
    Hello, I am using C# .NET Framework 2.0. I have a question relating to file shredding. My target operating systems are Windows 7, Windows Vista, and Windows XP. Possibly Windows Server 2003 or 2008 but I'm guessing they should be the same as the first three. My goal is to securely erase a file. I don't believe using File.Delete is secure at all. I read somewhere that the operating system simply marks the raw hard-disk data for deletion when you delete a file - the data is not erased at all. That's why there exists so many working methods to recover supposedly "deleted" files. I also read, that's why it's much more useful to overwrite the file, because then the data on disk actually has to be changed. Is this true? Is this generally what's needed? If so, I believe I can simply write the file full of 1's and 0's a few times. I've read: http://www.codeproject.com/KB/files/NShred.aspx http://blogs.computerworld.com/node/5756 http://blogs.computerworld.com/node/5687 http://stackoverflow.com/questions/4147775/securely-deleting-a-file-in-c-net

    Read the article

  • Should this even be a has_many :through association?

    - by GoodGets
    A Post belongs_to a User, and a User has_many Posts. A Post also belongs_to a Topic, and a Topic has_many Posts. class User < ActiveRecord::Base has_many :posts end class Topic < ActiveRecord::Base has_many :posts end class Post < ActiveRecord::Base belongs_to :user belongs_to :topic end Well, that's pretty simple and very easy to set up, but when I display a Topic, I not only want all of the Posts for that Topic, but also the user_name and the user_photo of the User that made that Post. However, those attributes are stored in the User model and not tied to the Topic. So how would I go about setting that up? Maybe it can already be called since the Post model has two foreign keys, one for the User and one for the Topic? Or, maybe this is some sort of "one-way" has_many through assiociation. Like the Post would be the join model, and a Topic would has_many :users, :through = :posts. But the reverse of this is not true. Like a User does NOT has_many :topics. So would this even need to be has_many :though association? I guess I'm just a little confused on what the controller would look like to call both the Post and the User of that Post for a give Topic. Edit: Seriously, thank you to all that weighed in. I chose tal's answer because I used his code for my controller; however, I could have just as easily chosen either j.'s or tim's instead. Thank you both as well. This was so damn simple to implement, and I think today marks the day that I'm beginning to fall in love with rails.

    Read the article

  • Is there a standard lexer/parser tool for Python?

    - by Salim Fadhley
    A volunteer job requires us to convert a large number of LaTeX documents into ePub format. It's a series of open-source fiction book which has so far only been produced only on paper via a print on demand service. We'd like to be able to offer the book to users of book-reader devices (such as Kindle) which require the ePub format for best results. Fortunately, ePub is a very simple format, however there's no trivial way for LaTeX to produce the XHTML outut required. We experimented with alternative LaTeX compilers (e.g. plastex) but in the end we figured that it would probably be a lot easier to simply write our own compiler which understands a tiny subset of the LaTeX language and compiles directly to XHTML / ePub. Previously I used a tool on Windows called GOLD. This allowed me to go directly from BNF grammars to a stub parser. It also alllowed me to implement the parser in any language I liked. (I'd choose Python). This product has to work on Linux, so I'm wondering if there's an equivalent toolchain that works as well under Ubutnu / Eclipse / Python. The idea is that we will take the grammar of TeX and just implement a teeny subset of that, but we do not want to spend a huge amount of time worrying about grammar and parsing. A parser generator would obviously save us a great deal of time. Sal UPDATE 1: Bonus marks for a solution with excellent documentation or tutorials.

    Read the article

  • How can I save an entire list of items true or false?

    - by JZ
    I'm following Ryan Bates, Railscast episode 52 and I've translated relevant parts of the code to work with Rails 3.0.0.beta2. In Ryan's case, he simply marks items incomplete and saves a timestamp. If an Item contains a timestamp the model returns the item in the completed list. I'm attempting to save ALL values true or false, depending on whether the check_box_tag is selected or not (using boolean). I am able to save ONLY selected items, true or false. How can I save an entire list of items true or false, depending on whether the checkbox is selected? The following is my attempt: controller logic: def yardsign Add.update_all(["yardsign=?", true], :id => params[:yard_ids]) redirect_to adds_path end html.erb: <%= form_tag yardsign_adds_path, :method => :put do %> <% @adds.each do |add| %> <td><%= check_box_tag "yard_ids[]", add.id %></td> <% end %> <% end %> routes.rb resources :adds do collection do put :yardsign end end Terminal Started POST "/adds/yardsign" for 127.0.0.1 at 2010-04-15 19:22:49 Processing by AddsController#yardsign as HTML Parameters: {"commit"=>"Update", "yardsigntakers"=>["1", "2"], "authenticity_token"=>"3arhsxg/Ky+0W7RNM2T3QditMTJmOnLR5CqmMYWN4Qw="} User Load (0.3ms) SELECT "users".* FROM "users" WHERE ("users"."id" = 1) LIMIT 1 SQL (1.8ms) UPDATE "adds" SET yardsign='t' WHERE ("adds"."id" IN (1, 2)) Redirected to http://localhost:3000/adds

    Read the article

  • iphone - using NSInvocation: constant value

    - by Mike
    I am dealing with an old iPhone OS 2.x project and I want to keep compatibility, while designing for 3.x. I am using NSInvocation, is a code like this NSInvocation* invoc = [NSInvocation invocationWithMethodSignature: [cell methodSignatureForSelector: @selector(initWithStyle:reuseIdentifier:)]]; [invoc setTarget:cell]; [invoc setSelector:@selector(initWithStyle:reuseIdentifier:)]; int arg2 = UITableViewCellStyleDefault; //???? [invoc setArgument:&arg2 atIndex:2]; [invoc setArgument:&identificadorNormal atIndex:3]; [invoc invoke]; to call 3.0 APIs on 2.0. I am having a problem on the line I marked with question marks. The problem there is that I am trying to assing to arg2, a constant that has not been defined in OS 2.0. As everything with NSInvocation is to do stuff indirectly to avoid compiler errors, how do I set this constant to a variable in an indirect way? Some sort of performSelector "assign value to variable"... is that possible? thanks for any help.

    Read the article

  • Problems with utf-8 encoding in php

    - by Addsy
    Hi, Another utf-8 related problem I believe... I am using php to update data in a mysql db then display that data elsewhere in the site. Previously I have run into utf-8 problems before where special characters are displayed as question marks when viewed in a browser but this one seems slightly different. I have a number of records to enter that contain the è character. If I enter this directly in the db then it appears correctly on the page so I take this to mean that utf-8 content is being output correctly. However when I try and update the values in the db through php, then the è character is replaced. What appears instead is & Atilde ; & uml ; (without the spaces) which appears in the browser as è I have the tables in the database set to use UTF-8. I believe this is correct cos, as mentioned, if I update the db through phpMyAdmin, its all ok. Similarly I have set the character encoding for the page which seems to be correct. I am also running the sql statement "SET NAMES 'utf8';" before trying to update the db. Anyone have any other ideas as to where the problem may lie? Many thanks

    Read the article

  • Silverlight graphics pixel side position?

    - by Tuukka
    I try to port simple game to silverlight (SameGame). The problem is that my old source code used pixel sizes to allight game marks to board. I draw simple grid using lines and game mark (using rectangle). How i can set rentacle position correctly? Example 20 20 pixels to upper left corner). private void DrawGrid() { LayoutRoot.Children.Clear(); Rectangle r = new Rectangle(); r.Width = 20; r.Height = 20; r.Fill = new SolidColorBrush(Color.FromArgb(255, 0, 255, 0)); r.Stroke = new SolidColorBrush(Color.FromArgb(255, 0, 255, 0)); r.SetValue(Canvas.LeftProperty, (double)0); r.SetValue(Canvas.TopProperty, (double)0); LayoutRoot.Children.Add(r); Color GridColor = Color.FromArgb(0xFF, 0x00, 0x00, 0x00); for (int y = 0; y < 11; y++) { Line l = new Line(); l.X1 = 0; l.Y1 = 30 * y - 1; l.X2 = 20 * 30; l.Y2 = 30 * y - 1; l.Stroke = new SolidColorBrush(GridColor); l.StrokeThickness = 1; LayoutRoot.Children.Add(l); } for (int x = 0; x < 21; x++) { Line l = new Line(); l.X1 = 30 * x; l.Y1 = 0; l.X2 = 30 * x; l.Y2 = 10 * 30; l.Stroke = new SolidColorBrush(GridColor); l.StrokeThickness = 1; LayoutRoot.Children.Add(l); } }

    Read the article

  • Deep copy objects from different namespaces

    - by Wasim
    Hi all, I have the following situation: I have class User with the follwing properies : public class User { string user name ; List <Contact> contacts ; List <BookMark> book marks; . . . } I have the same class in a different namespace , with some different properties . BWT , it's the same situation of it's classes (Contact) and (BookMark). I need to make a deep copy of the same properties from the two classes . Actually , I arrive to this situation by having an Entity Framework edmx file . I created the first database (SQL server 2008) from this model . And copied he same edmx file to another project and created the database with SQL CE db. Now I get the first data model objects by WCF service and need to persist them in the local database in my application . The objects are the same but there are some changs because of the modeling issue with a different databse. Do you have any workarround about this assue. Thanks in advance ...

    Read the article

  • How to sort a date array in PHP

    - by Click Upvote
    I have an array in this format: Array ( [0] => Array ( [28th February, 2009] => 'bla' ) [1] => Array ( [19th March, 2009] => 'bla' ) [2] => Array ( [5th April, 2009] => 'bla' ) [3] => Array ( [19th April, 2009] => 'bla' ) [4] => Array ( [2nd May, 2009] => 'bla' ) ) I want to sort them out in the ascending order of the dates (based on the month, day, and year). What's the best way to do that? Originally the emails are being fetched in the MySQL date format, so its possible for me to get the array in this state: Array [ ['2008-02-28']='some text', ['2008-03-06']='some text' ] Perhaps when its in this format, I can loop through them, remove all the '-' (hyphen) marks so they are left as integars, sort them using array_sort() and loop through them yet again to sort them? Would prefer if there was another way as I'd be doing 3 loops with this per user. Thanks. Edit: I could also do this: $array[$index]=array('human'=>'28 Feb, 2009', 'db'=>'20080228', 'description'=>'Some text here'); But using this, would there be any way to sort the array based on the 'db' element alone? Edit 2: Updated initial var_dump

    Read the article

  • R:how to get grep to return the match, rather than the whole string

    - by Mike Dewar
    Hi, I have what is probably a really dumb grep in R question. Apologies, because this seems like it should be so easy - I'm obviously just missing something. I have a vector of strings, let's call it alice. Some of alice is printed out below: T.8EFF.SP.OT1.D5.VSVOVA#4 T.8EFF.SP.OT1.D6.LISOVA#1 T.8EFF.SP.OT1.D6.LISOVA#2 T.8EFF.SP.OT1.D6.LISOVA#3 T.8EFF.SP.OT1.D6.VSVOVA#4 T.8EFF.SP.OT1.D8.VSVOVA#3 T.8EFF.SP.OT1.D8.VSVOVA#4 T.8MEM.SP#1 T.8MEM.SP#3 T.8MEM.SP.OT1.D106.VSVOVA#2 T.8MEM.SP.OT1.D45.LISOVA#1 T.8MEM.SP.OT1.D45.LISOVA#3 I'd like grep to give me the number after the D that appears in some of these strings, conditional on the string containing "LIS" and an empty string or something otherwise. I was hoping that grep would return me the value of a capturing group rather than the whole string. Here's my R-flavoured regexp: pattern <- (?<=\\.D)([0-9]+)(?=.LIS) nothing too complicated. But in order to get what I'm after, rather than just using grep(pattern, alice, value = TRUE, perl = TRUE) I'm doing the following, which seems bad: reg.out <- regexpr( "(?<=\\.D)[0-9]+(?=.LIS)", alice, perl=TRUE ) substr(alice,reg.out,reg.out + attr(reg.out,"match.length")-1) Looking at it now it doesn't seem too ugly, but the amount of messing about it's taken to get this utterly trivial thing working has been embarrassing. Anyone any pointers about how to go about this properly? Bonus marks for pointing me to a webpage that explains the difference between whatever I access with $,@ and attr.

    Read the article

  • Netty options for real-time distribution of small messages to a large number of clients?

    - by user439407
    I am designing a (near) real-time Netty server to distribute a large number of very small messages to a large number of clients across the internet. In internal, go as fast as you can testing, I found that I could do 10k clients no sweat, but now that we are trying to go across the internet, where the latency, bandwidth etc varies pretty wildly we are running into the dreaded outOfMemory issues, even with 2 gigs of RAM. I have tried various workarounds(setting the socket stack sizes smaller, setting high and low water marks, cancelling things that are too old), and they help a little, but they seem to only help a little bit. What would some good ways to optimize Netty for sending large #s of small messages without significant delays? Also, the bulk of the message only consists of one kind of message that I don't particularly care if it doesn't arrive. I would use UDP but because we don't control the client, thats not really a possibility. Is it possible to set a separate timeout solely for this kind of message without affecting the other messages? Any insight you could offer would be greatly appreciated.

    Read the article

  • Database design and foreign keys: Where should they be added in related tables?

    - by Carvell Fenton
    I have a relatively simple subset of tables in my database for tracking something called sessions. These are academic sessions (think offerings of a particular program). The tables to represent a sessions information are: sessions session_terms session_subjects session_mark_item_info session_marks All of these tables have their own primary keys, and are like a tree, in that sessions have terms, terms have subjects, subjects have mark items, etc. So each on would have at least its "parent's" foreign key. My question is, design wise is it a good idea to include the sessions primary key in the other tables as a foreign key to easily select related session items, or is that too much redundency? If I include the session foreign key (or all parent foreign keys from tables up the heirarchy) in all the tables, I can easily select all the marks for a session. As an example, something like SELECT mark FROM session_marks WHERE sessionID=... If I don't, then I would have to combine selects with something like WHERE something IN (SELECT... Which approach is "more correct" or efficient? Thanks in advance!

    Read the article

  • Regex for removing certain variable numeric values from some text

    - by stephemurdoch
    I want to substitute all 4 instances of the number 300 from the code below, with 470. <div> <object width="300" height="300"> <embed src="link-removed" width="300" height="300"></embed> </object> <p> <a href="another-link">link</a> </p> </div> The width and height of the code being pasted might not always be 300 by 300. So I figure I probably need a regular expression that subs any numeric value that follows the strings "width=" and "height=", whilst remembering to account for the quotations marks that surround the number. Can anyone tell me if that's the best way, and if so, what would be the best regex? In case it matters, the code being pasted is stored as "text" in the db rather than as a string, as it's quite lengthy (i've removed a few hundred chars from what you see pasted here)...

    Read the article

  • ExternalInterface issue on loadup with FireFox

    - by Rudy
    Hello, I have an issue with my ExternalInterface. The way it is currently set up is, on the page load up, a boolean is set to true in JavaScript and then checked by ActionScript constructors (using a timer) until it is true. This marks that JavaScript is ready to get calls from AS3. At this point, AS3 will add the callback and do some internal stuff, and at the end of the constructor I call JavaScript. So far so good. JavaScript will at this point call a function in AS3 (that was defined in the callback described above), and this is where it all messes up. On IE this works perfectly fine. On FireFox though, it does not. When I debug it, I see that the javascript function is called but when it tries to call AS3, nothing happens. I also tried to add a timer, but for some reason the function STILL executes straight away (in IE). What is very weird is that a second or two later, that function will work, so it seems that the Flash is not completely loaded in FireFox? But it runs to the last line of my constructor, so I would believe it's loaded. Any idea please, I am really stuck. Thanks a lot, Rudy

    Read the article

  • PEAR mail not sending to .eu email addresses

    - by andy-score
    I have a PEAR mailing script that is used to send newsletters from a clients website. I've used the same code before to produce another newsletter system and it has worked well and been used to send emails to various addresses, however our latest client has email addresses ending .eu and this seems to cause a problem. When the newsletter is sent from the site to the various subscribers, including gmail, hotmail, yahoo and our own company emails, the emails are received correctly by all but the clients email addresses, the ones ending in .eu. As there is nothing different between their mailing system and our own, which is run from the same hosting company, I have to conclude that it is something to do with the domain name. The emails are being sent to the addresses from the system, as I have a log file storing the email addresses when the mail out function is called, but the newsletter never appears in the inbox. I have created a new email account for the domain and that too isn't receiving the emails. It's not going into a spam folder as the webmail system marks spam by adding SPAM into the subject. I've tried to log if there are any errors using the following foreach($subscribers as $recipient) { $send_newsletter = $mail->send($recipient, $headers, $body); // LOG INFO $message = $recipient; if($send_newsletter) { $message .= ' SENT'; } elseif(PEAR::isError($send_newsletter)) { $message .= ' ERROR: '.$send_newsletter->getMessage(); } $message .= ' | '; fwrite($log_file,$message); } However this simple returns SENT for all recipients, so in theory there isn't anything wrong with the mailing function. I don't know a great deal about PEAR or the mailing function so I may be missing something important, but I'd have thought seeing the last thing to happen is sending the email out, and that seems to work, then it should reach the clients inbox. Is this something to do with the PEAR mailing function not liking .eu addresses or is it more likely to be something wrong in my code or with their domain? Any help is greatly appreciated as the client and myself are getting both confused and frustrated by the whole thing. Cheers

    Read the article

  • Speeding up inner-joins and subqueries while restricting row size and table membership

    - by hiffy
    I'm developing an rss feed reader that uses a bayesian filter to filter out boring blog posts. The Stream table is meant to act as a FIFO buffer from which the webapp will consume 'entries'. I use it to store the temporary relationship between entries, users and bayesian filter classifications. After a user marks an entry as read, it will be added to the metadata table (so that a user isn't presented with material they have already read), and deleted from the stream table. Every three minutes, a background process will repopulate the Stream table with new entries (i.e. whenever the daemon adds new entries after the checks the rss feeds for updates). Problem: The query I came up with is hella slow. More importantly, the Stream table only needs to hold one hundred unread entries at a time; it'll reduce duplication, make processing faster and give me some flexibility with how I display the entries. The query (takes about 9 seconds on 3600 items with no indexes): insert into stream(entry_id, user_id) select entries.id, subscriptions_users.user_id from entries inner join subscriptions_users on subscriptions_users.subscription_id = entries.subscription_id where subscriptions_users.user_id = 1 and entries.id not in (select entry_id from metadata where metadata.user_id = 1) and entries.id not in (select entry_id from stream where user_id = 1); The query explained: insert into stream all of the entries from a user's subscription list (subscriptions_users) that the user has not read (i.e. do not exist in metadata) and which do not already exist in the stream. Attempted solution: adding limit 100 to the end speeds up the query considerably, but upon repeated executions will keep on adding a different set of 100 entries that do not already exist in the table (with each successful query taking longer and longer). This is close but not quite what I wanted to do. Does anyone have any advice (nosql?) or know a more efficient way of composing the query?

    Read the article

  • Replacing accented/umlauted characters with their unadorned counterparts in C# [closed]

    - by Andrew Rollings
    Duplicate of 249087 I have a bunch of user generated addresses that may contain characters with diacritic marks. What is the most effective (i.e. generic) way (apart from a straightforward replace) to automatically convert any such characters to their closest English equivalent? E.g. any of àâãäå would become a æ would become the two separate letters ae ç would become c any of èéêë would become e etc. for all possible letter variations (preferably without having to find and encode lookups for each diacritic form of the letter). (Note: I have to pass these addresses on to third party software that is incapable of printing anything other than English characters. I'd rather the software was capable of handling them, but I have no control over that.) EDIT: Never mind... Found the answer [here][2]. It showed up in the "Related" section to the right of the question after I posted, but not in my prior search or as a pre-post suggestion. Hmm. I added the 'diacritics' tag to the other question in any case. EDIT 2: Jeez! Who voted this -1 after I closed it?

    Read the article

  • L10N: Trusted test data for Locale Specific Sorting

    - by Chris Betti
    I'm working on an internationalized database application that supports multiple locales in a single instance. When international users sort data in the applications built on top of the database, the database theoretically sorts the data using a collation appropriate to the locale associated with the data the user is viewing. I'm trying to find sorted lists of words that meet two criteria: the sorted order follows the collation rules for the locale the words listed will allow me to exercise most / all of the specific collation rules for the locale I'm having trouble finding such trusted test data. Are such sort-testing datasets currently available, and if so, what / where are they? "words.en.txt" is an example text file containing American English text: Andrew Brian Chris Zachary I am planning on loading the list of words into my database in randomized order, and checking to see if sorting the list conforms to the original input. Because I am not fluent in any language other than English, I do not know how to create sample datasets like the following sample one in French (call it "words.fr.txt"): cote côte coté côté The French prefer diacritical marks to be ordered right to left. If you sorted that using code-point order, it likely comes out like this (which is an incorrect collation): cote coté côte côté Thank you for the help, Chris

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >