Search Results

Search found 2434 results on 98 pages for 'alex erwin'.

Page 6/98 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • SQL Like keyword in Dynamic Linq

    - by Erwin
    Hi fellow programmer I want to use SQL's Like keyword in dynamic LINQ. The query that I want to make is like this select * from table_a where column_a like '%search%' Where the column_a can be dynamically changed to other column etc In this dynamic LINQ var result = db.table_a.Where( a=> (a.column_a.Contains("search")) ); But the column can't be dynamically changed , only the search key can How do we create a dynamic LINQ like var result = db.table_a.Where("column_a == \"search\""); That we can change the column and the search key dynamically

    Read the article

  • SQL : where vs. on in join

    - by Erwin
    Perhaps a dumb question, but consider these 2 tables : T1 Store Year 01 2009 02 2009 03 2009 01 2010 02 2010 03 2010 T2 Store 02 Why is this INNER JOIN giving me the results I want (filtering the [year] in the ON clause) : select t1.* from t1 inner join t2 on t1.store = t2.store and t1.[year] = '2009' Store Year 02 2009 And why the LEFT OUTER JOIN include records of year 2010 ? select t1.* from t1 left outer join t2 on t1.store = t2.store and t1.year = '2009' where t2.store is null 01 2009 03 2009 01 2010 02 2010 03 2010 And I have to write the [year] filter in the 'WHERE' clause : select t1.* from t1 left outer join t2 on t1.store = t2.store where t2.store is null and t1.year = '2009' 01 2009 03 2009 Like I said, perhaps a dumb question, but it's bugging me !

    Read the article

  • BIRT number to word as computed column

    - by Erwin
    Hi fellow programmer I want to ask how to add a computed column in BIRT that compute a number to its word representation? (ex. 100 to "one hundred") So in my data set I can have a column that holds the string I'm new at BIRT hopefully there's a pointer or two for me

    Read the article

  • return a js file from asp.net mvc controller

    - by Erwin
    Hi all fellow programmer I'd like to have a separate js file for each MVC set I have in my application /Controllers/ -TestController.cs /Models/ /Views/ /Test/ -Index.aspx -script.js And I'd like to include the js in the Index.aspx by <script type="text/javascript" src="<%=UriHelper.GetBaseUrl()%>/Test/Js"></script> Or to put it easier, when I call http://localhost/Test/Js in the browser, it will show me the script.js file How to write the Action in the Controller? I know that this must be done with return File method, but I haven't successfully create the method :(

    Read the article

  • Ruby for Rails: underfined method 'name ' for #<Array:0xb6c971cc>

    - by erwin
    Hi, I want to display the column 'name' after being found from the table mytest. In the mytest.rb, I defined "attrib_accessor :name"; In the procedure index under directory /controller/mytest_controller.rb, def index .....###[Ignore some code] @[email protected]_by_id ### I am able to verify the tuples in @mytesttbl end In the /view/mytest/index.rhtml, I have code like "mytesttbl", :object = @mytesttbl)% In the /view/mytest/_mytesttbl.html.erb. I have code like <%=mytesttbl.name % when I ran the above code, I have error on _mytesttbl.html.erb, underfined method 'name ' for # Please help. Thanks,

    Read the article

  • Using PostRequestHandlerExecute, Flush and Close to clean up after a request - why is this bad?

    - by Erwin
    After some requests I need to clean up after the user - by calling a remote web service to release some resources if I guess the user doesn't need them anymore. It is ok to leave them hanging and letting them time out on the other server, but the polite thing to do is to inform it that I do not need them anymore. I do not want to waste the users time waiting for cleaning - so I tried to find place to put it. First I tried Application_EndRequest, but I needed something later. Then I found PostRequestHandlerExecute which seemed like a nice place, but I still need a Flush and Close to release the connection to the user. Protected Sub Application_PostRequestHandlerExecute(ByVal sender As Object, ByVal e As System.EventArgs) Response.Flush() Response.Close() ' Simulation of clean up activity: System.Threading.Thread.Sleep(4000) ' Really a couple of web service calls End Sub Is there some other place I could put these lengthy clean up routines?

    Read the article

  • asp.net mvc post variable to controller

    - by Erwin
    Hello fellow programmer I came from PHP language(codeigniter), but now I learning ASP.Net MVC :) In PHP codeigniter we can catch the post variable easily with $this->input->post("theinput"); I know that in ASP.Net MVC we can create an action method that will accepts variable from post request like this public ActionResult Edit(string theinput) Or by public ActionResult Edit(FormCollection formCol) Is there a way to catch post variable in ASP.Net like PHP's codeigniter, so that we don't have to write FormCollection object nor have to write parameter in the action method (because it can get very crowded there if we pass many variable into it) Is there a simple getter method from ASP.Net to catch these post variables?

    Read the article

  • How to dispose data context after usage

    - by Erwin
    Hi fellow programmer I have a member class that returned IQueryable from a data context public static IQueryable<TB_Country> GetCountriesQ() { IQueryable<TB_Country> country; Bn_Master_DataDataContext db = new Bn_Master_DataDataContext(); country = db.TB_Countries .OrderBy(o => o.CountryName); return country; } As you can see I don't delete the data context after usage. Because if I delete it, the code that call this method cannot use the IQueryable (perhaps because of deferred execution?). How to force immediate execution to this method? So I can dispose the data context.. Thank you :D

    Read the article

  • how to specify the file path in rails over Mongrel web server

    - by erwin
    hi, I have a request to load a swf file, flaMovie.swf from rails. The swf file is located the directory /home/user1/railsproj/flash. I have the code index.rhtml under view directory to show the .swf file, ID=flaMovie WIDTH=250 HEIGHT=250 When I ran the code, I got the error, ActionController::RoutingError (No route matches "/home/user1/railsproj/flash/flaMovie.swf" with {:method=:get}): /vendor/rails/actionpack/lib/action_controller/routing.rb:1441:in recognize_path' /vendor/rails/actionpack/lib/action_controller/routing.rb:1424:inrecognize' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:170:in handle_request' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:indispatch' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in dispatch_cgi' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:indispatch' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:insynchronize' My rails project is located in /home/user1/railsproj and the web server is Mongrel web server. How to specify the path in the rhtml file so that Mongrel server is able to locate the file? Thanks a lot,

    Read the article

  • SQL Server: collect values in an aggregation temporarily and reuse in the same query

    - by Erwin Brandstetter
    How do I accumulate values in t-SQL? AFAIK there is no ARRAY type. I want to reuse the values like demonstrated in this PostgreSQL example using array_agg(). SELECT a[1] || a[i] AS foo ,a[2] || a[5] AS bar -- assuming we have >= 5 rows for simplicity FROM ( SELECT array_agg(text_col ORDER BY text_col) AS a ,count(*)::int4 AS i FROM tbl WHERE id between 10 AND 100 ) x How would I best solve this with t-SQL? Best I could come up with are two CTE and subselects: ;WITH x AS ( SELECT row_number() OVER (ORDER BY name) AS rn ,name AS a FROM #t WHERE id between 10 AND 100 ), i AS ( SELECT count(*) AS i FROM x ) SELECT (SELECT a FROM x WHERE rn = 1) + (SELECT a FROM x WHERE rn = i) AS foo ,(SELECT a FROM x WHERE rn = 2) + (SELECT a FROM x WHERE rn = 5) AS bar FROM i Test setup: CREATE TABLE #t( id INT PRIMARY KEY ,name NVARCHAR(100)) INSERT INTO #t VALUES (3 , 'John') ,(5 , 'Mary') ,(8 , 'Michael') ,(13, 'Steve') ,(21, 'Jack') ,(34, 'Pete') ,(57, 'Ami') ,(88, 'Bob') Is there a simpler way?

    Read the article

  • jquery select element inside a class

    - by Erwin
    Hi fellow programmer I want to select an anchor inside a div like this <div class="response content"> Disapproved Bank Mandiri<br><br> <p> <a class="showlist" href="#">Back to list?</a> </p> </div> What is the jquery to do this ?

    Read the article

  • LINQ version of SQL's LIKE statement

    - by Erwin
    Hi fellow coders I'm new at LINQ, searching the net for LINQ samples that mimic SQL's LIKE statement doesn't satisfy myself. What I want is producing the same query result as this SQL SELECT * FROM table_1 WHERE column_1 LIKE '__0%' I want to query from table_1 where column_1's third character is '0' Is there equivalent statement in LINQ :D thank you

    Read the article

  • Network Management Cable Labeling Techniques and their alternatives [closed]

    - by Alex
    Possible Duplicate: What is the most effective solution you used to label cables? Yes i know there are a lot of howtos and already answered questions about this topic, like this one: How do you organise the cables in your racks? Currently i am searching the web for different techniques (alternatives) for labeling the cables at the server racks and/or data centers. Unfortunately i do not have any experience with labeling/documentation of network cables in a large scale. As far as I could lookup by now the current labeling techniques are coloring and a self defined print-labeling technique (numbering, text) maybe also according to a standard which are usually used. I want to know if QR, RFID (ok RFID in a data center would be stupid due to the radio frequency wouldn't it be?), Barcodes or similar (??) have already been used by some administrators or why they did not consider such techniques at all? Too complicated (with QR scanner etc..) if you are in front of the cables and want to get quick feedback for what the cable is? What alternatives are out there? Advantages/Disadvantages? Best-Practice? I would appreciate any help on this topic, thank you! Regards, Alex

    Read the article

  • Windows Server 2008 SMTP & POP3 Configuration

    - by Alex Hope O'Connor
    This is the first time I have ever configured a VPS server without 3rd party applications such as Plesk control panel. I have got most functionality working in all my websites except I am very unsure as to how I can setup my email functionality on this new server. Basically I want the standard POP3 functionality, a bunch of accounts with private boxes, all able to send and receive emails using their individual usernames and passwords. My server setup is pretty simple, its a VPS with IIS & DNS Server running. What I have tried to do to setup SMTP & POP3 is adding the SMTP Server feature through the Server Manager Console (very unsure of the configuration as guides I found did not explain), I then installed a 3rd party application called Visdeno SMTP Extender as it claims to be a POP3 service providing accounting and the ability to communicate with email clients. That is as far as I have gotten as I can not seem to find too much information on the subject. So can someone please tell me how to go about configuring these services in order to provide standard SMTP & POP3 functionality? Thanks, Alex.

    Read the article

  • How does enterprise failover, such as with google.com, actually work?

    - by Alex Regan
    We have a few fedora systems that are configured for web, FTP, and email services. We'd like to mirror these services, so that we can provide near 100% reliability for our users. I'm a fairly experienced Linux administrator, but don't have much experience with redundant systems. What is the best way to do this? How does google and amazon do it? Google.com resolves to multiple IP addresses, but if my local desktop caches one of the IPs that are unreachable, I'm going to get a failed connection message. How do they prevent that from happening? If one of their servers goes down, how is it automatically redirected to another system, without the end-user ever knowing it? I understand there are failover devices, but they're only for failing over the system itself, not a complete network. Let's say we have the worst-case scenario, such as my primary system becomes inaccessible. What are the fundamental components that are used on Linux systems to provide this capability? I'm looking for concepts, or approaches, not answers like "check out openstack". What are the actual pieces that make up the solution? What has to be done to implement this capability? Hopefully my question is clear. I'd like to know what the pieces are that make up a failover system and what approach is taken by successful organizations that implement it. Thanks again, Alex

    Read the article

  • Exchange 2010 Mail Enabled Public Folder Unable to Recieve External (anon) e-mail.

    - by Alex
    Hello All, I am having issues with my "Public Folders" mail enabled folders receiving e-mails from external senders. The folder is setup with three Accepted Domains (names changed for privacy reasons): 1 - domain1.com (primary & Authoritative) 2 - domain2.com (Authoritative) 3 - domain3.com (Authoritative) When someone attempts to send an e-mail to [email protected] from inside the organization, the e-mail is received and placed in the appropriate folder. However, when someone tries to send an e-mail from outside the organization (such as a gmail account), the following error message is received: "Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 554 554 Recipient address rejected: User unknown (state 14)." When I try to send an e-mail to the same folder, using the same e-mail address above ([email protected]), but with domain2.com instead of domain3.com, it works as intended (both internal & external). I have checked, double checked, and triple checked my DNS settings comparing those from domain2 & domain3 with them both appearing identical. I have tried recreating the folders in question with the same results. I have also ran Get-PublicFolderClientPermission "\Web Programs\folder" with the following results for user anonymous: RunspaceId : 5ff99653-a8c3-4619-8eeb-abc723dc908b Identity : \Web Programs\folder User : Anonymous AccessRights : {CreateItems} Domain2.com & Domain3.com are duplicates of each other, but only domain2.com works as intended. All other exchange functions are functioning properly. If anyone out there has any suggestions, I would love to hear them. I've just hit a brick wall. Thanks for all your help in advance! --Alex

    Read the article

  • Forward Apache to Django dev server

    - by Alex Jillard
    I'm trying to get apache to forward all requests on port 80 to 127.0.0.1:8000, which is where the django dev server runs. I think I have it forwarding properly, but there must be an issue with 127.0.0.1:8000 not being run by apache? I'm running the django dev server in an ubuntu vmware instance, and I'd other people in the office to see the apps in development without having to promote anything to our actual dev/staging servers. Right now the virtual machine picks up an IP for itself, and when I point a browser to that url with the defualt apache config, I get the default apache page. I've since changed the httpd.conf file to the following to try and get it to forward the requests to the django dev server: ServerName localhost <Proxy *> Order deny,allow Allow from all </Proxy> <VirtualHost *> ServerName localhost ServerAdmin [email protected] ProxyRequests off ProxyPass * http://127.0.0.1:8000 </VirtualHost> All I get are 404s with this, and in error.log I get the following (192.168.1.101 is the IP of my computer 192.168.1.142 is the IP of the virtual machine): [Mon Mar 08 08:42:30 2010] [error] [client 192.168.1.101] File does not exist: /htdocs

    Read the article

  • Odd behavior in Django Form (readonly field/widget)

    - by jamida
    I'm having a problem with a test app I'm writing to verify some Django functionality. The test app is a small "grade book" application that is currently using Alex Gaynor's readonly field functionality http://lazypython.blogspot.com/2008/12/building-read-only-field-in-django.html There are 2 problems which may be related. First, when I flop the comment on these 2 lines below: # myform = GradeForm(data=request.POST, instance=mygrade) myform = GradeROForm(data=request.POST, instance=mygrade) it works like I expect, except of course that the student field is changeable. When the comments are the shown way, the "studentId" field is displayed as a number (not the name, problem 1) and when I hit submit I get an error saying that studentId needs to be a Student instance. I'm at a loss as to how to fix this. I'm not wedded to Alex Gaynor's code. ANY code will work. I'm relatively new to both Python and Django, so the hints I've seen on websites that say "making a read-only field is easy" are still beyond me. // models.py class Student(models.Model): name = models.CharField(max_length=50) parent = models.CharField(max_length=50) def __unicode__(self): return self.name class Grade(models.Model): studentId = models.ForeignKey(Student) finalGrade = models.CharField(max_length=3) # testbed.grades.readonly is alex gaynor's code from testbed.grades.readonly import ReadOnlyField class GradeROForm(ModelForm): studentId = ReadOnlyField() class Meta: model=Grade class GradeForm(ModelForm): class Meta: model=Grade // views.py def modifyGrade(request,student): student = Student.objects.get(name=student) mygrade = Grade.objects.get(studentId=student) if request.method == "POST": # myform = GradeForm(data=request.POST, instance=mygrade) myform = GradeROForm(data=request.POST, instance=mygrade) if myform.is_valid(): grade = myform.save() info = "successfully updated %s" % grade.studentId else: # myform=GradeForm(instance=mygrade) myform=GradeROForm(instance=mygrade) return render_to_response('grades/modifyGrade.html',locals()) // template <p>{{ info }}</p> <form method="POST" action=""> <table> {{ myform.as_table }} </table> <input type="submit" value="Submit"> </form> // Alex Gaynor's code from django import forms from django.utils.html import escape from django.utils.safestring import mark_safe from django.forms.util import flatatt class ReadOnlyWidget(forms.Widget): def render(self, name, value, attrs): final_attrs = self.build_attrs(attrs, name=name) if hasattr(self, 'initial'): value = self.initial return mark_safe("<span %s>%s</span>" % (flatatt(final_attrs), escape(value) or '')) def _has_changed(self, initial, data): return False class ReadOnlyField(forms.FileField): widget = ReadOnlyWidget def __init__(self, widget=None, label=None, initial=None, help_text=None): forms.Field.__init__(self, label=label, initial=initial, help_text=help_text, widget=widget) def clean(self, value, initial): self.widget.initial = initial return initial

    Read the article

  • Searches (and general querying) with HBase and/or Cassandra (best practices?)

    - by alexeypro
    I have User model object with quite few fields (properties, if you wish) in it. Say "firstname", "lastname", "city" and "year-of-birth". Each user also gets "unique id". I want to be able to search by them. How do I do that properly? How to do that at all? My understanding (will work for pretty much any key-value storage -- first goes key, then value) u:123456789 = serialized_json_object ("u" as a simple prefix for user's keys, 123456789 is "unique id"). Now, thinking that I want to be able to search by firstname and lastname, I can save in: f:Steve = u:384734807,u:2398248764,u:23276263 f:Alex = u:12324355,u:121324334 so key is "f" - which is prefix for firstnames, and "Steve" is actual firstname. For "u:Steve" we save as value all user id's who are "Steve's". That makes every search very-very easy. Querying by few fields (properties) -- say by firstname (i.e. "Steve") and lastname (i.e. "l:Anything") is still easy - first get list of user ids from "f:Steve", then list from "l:Anything", find crossing user ids, an here you go. Problems (and there are quite a few): Saving, updating, deleting user is a pain. It has to be atomic and consistent operation. Also, if we have size of value limited to some value - then we are in (potential) trouble. And really not of an answer here. Only zipping the list of user ids? Not too cool, though. What id we want to add new field to search by. Eventually. Say by "city". We certainly can do the same way "c:Los Angeles" = ..., "c:Chicago" = ..., but if we didn't foresee all those "search choices" from the very beginning, then we will have to be able to create some night job or something to go by all existing User records and update those "c:CITY" for them... Quite a big job! Problems with locking. User "u:123" updates his name "Alex", and user "u:456" updates his name "Alex". They both have to update "f:Alex" with their id's. That means either we get into overwriting problem, or one update will wait for another (and imaging if there are many of them?!). What's the best way of doing that? Keeping in mind that I want to search by many fields? P.S. Please, the question is about HBase/Cassandra/NoSQL/Key-Value storages. Please please - no advices to use MySQL and "read about" SELECTs; and worry about scaling problems "later". There is a reason why I asked MY question exactly the way I did. :-)

    Read the article

  • log4net dependency problem

    - by Alex DeLarge
    I have an issue with log4net which has been bugging me for a while and I've resolved to sort it. I have a class library which references log4net. If I reference this class library in another project I must then reference log4net in this project otherwise I get a build error Unknown build error, 'Cannot resolve dependency to assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.' I'm aware that the error message is probably telling me the solution, unfortunately I don't speak gibberish... Cheers guys Alex..

    Read the article

  • Iphone Custom UITabBarItem without rounded edges

    - by Alex Milde
    hi i try to customize a uitabbar i extended uitabbar item and now have a customized image in it but i cant get rid of the rounded edges. code: @interface CustomTabBarItem : UITabBarItem { UIImage *customHighlightedImage; } @property (nonatomic, retain) UIImage *customHighlightedImage; @end @implementation CustomTabBarItem @synthesize customHighlightedImage; - (void) dealloc { [customHighlightedImage release]; customHighlightedImage=nil; [super dealloc]; } -(UIImage *) selectedImage { return self.customHighlightedImage; } @end maybe somoen knows how to get rid of the rounded rect around the image thanks in advance alex

    Read the article

  • HTML5 cache manifest: whitelisting ALL remote resources?

    - by Alex Ford
    I'm doing an iPhone version of a desktop site that includes a blog. The blog often embeds images from other domains (the image URLs always start with http:// in this case, obviously), but because I'm using cache-manifest, these images don't load because they aren't declared in the manifest file. I have a NETWORK: whitelist section that has all of my AJAX request files, etc. I've even whitelisted the flickr farm domains because a lot of the images we add to the blog come from our flickr page. The flickr images show up just fine, but any other "random" image hotlinks from another domain show broken. I tried adding a line like this: http:// to the NETWORK: section, but it doesn't seem to like http:// as a whitelist. Does anyone have any thoughts on this? Thanks! Alex

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >