Search Results

Search found 602 results on 25 pages for 'victor lin'.

Page 10/25 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • How to suppress a compiler warning in C# without using #pragma ?

    - by Dylan Lin
    Hi, I need to suppress a specfic compiler warning in C#. Now I can do it like this: #pragma warning disable 0649 private string _field; #pragma warning restore 0649 Is there a way to do it like the following? [SuppressCompilerWarning("0649")] private string _field; Because I only need to suppress warnings for this field, not a code block. Note: I want to suppress the compiler warning, not the Code-Analysis warning. Thanks!

    Read the article

  • if_attribute on declarative authorization

    - by Victor Martins
    I have a many-to-many relationship like this: A user has_many organizations through affiliations and vice-versa. I'm using declarative organizations and I only want a user to edit a particular organization if he is affiliated and the affiliationtype attribute of affiliation is a particular value. So affiliations has 3 columns , user_id, organization_id and affiliationtype_id I can do: o = Organization.find(:first) o.affiliatons[0].user and get the user now I wish to do this: has_permission_on [:organizations], :to => :edit do if_attribute (...) end That if_attribute should see if the current user is the organization.affiliation[?].user and if the organization.affiliation[?].affiliationtype_id = "3" I hope this is syntax issue ... I really need to get this working.

    Read the article

  • Typus not working in Heroku (error 500) what im doing wrong?

    - by Victor P
    Have someone used Typus (admin plugin for rails) in Heroku? http://intraducibles.com/projects/typus/install I follow the instructions and in my local machine (Rails 2.3.5) is working fine, but when I deploy to Heroku it crashes. What Im doing wrong? the log: Logfile created on Mon Mar 29 18:14:06 -0700 2010 Processing TypusController#dashboard (for 190.196.113.93 at 2010-03-29 18:14:07) [GET] Parameters: {"action"=>"dashboard", "controller"=>"typus"} ActiveRecord::StatementInvalid (PGError: ERROR: relation "typus_users" does not exist : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"typus_users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum ): vendor/plugins/typus/app/controllers/typus_controller.rb:128:in `verify_typus_users_table_schema' /home/heroku_rack/lib/static_assets.rb:9:in `call' /home/heroku_rack/lib/last_access.rb:25:in `call' /home/heroku_rack/lib/date_header.rb:14:in `call' thin (1.0.1) lib/thin/connection.rb:80:in `pre_process' thin (1.0.1) lib/thin/connection.rb:78:in `catch' thin (1.0.1) lib/thin/connection.rb:78:in `pre_process' thin (1.0.1) lib/thin/connection.rb:57:in `process' thin (1.0.1) lib/thin/connection.rb:42:in `receive_data' eventmachine (0.12.6) lib/eventmachine.rb:240:in `run_machine' eventmachine (0.12.6) lib/eventmachine.rb:240:in `run' thin (1.0.1) lib/thin/backends/base.rb:57:in `start' thin (1.0.1) lib/thin/server.rb:150:in `start' thin (1.0.1) lib/thin/controllers/controller.rb:80:in `start' thin (1.0.1) lib/thin/runner.rb:173:in `send' thin (1.0.1) lib/thin/runner.rb:173:in `run_command' thin (1.0.1) lib/thin/runner.rb:139:in `run!' thin (1.0.1) bin/thin:6 /usr/local/bin/thin:20:in `load' /usr/local/bin/thin:20 Rendering /disk1/home/slugs/157361_3469154_60b1/mnt/public/500.html (500 Internal Server Error)

    Read the article

  • Creating a second form page for a has_many relationship

    - by Victor Martins
    I have an Organization model that has_many users through affiliations. And, in the form of the organization ( the standard edit ) I use semanting_form_for and semantic_fields_for to display the organization fields and affiliations fields. But I wish to create a separete form just to handle the affiliations of a specific organization. I was trying to go to the Organization controller and create a an edit_team and update_team methods then on the routes create those pages, but it's getting a mess and not working. am I on the right track?

    Read the article

  • Could CouchDB benefit significantly from the use of BERT instead of JSON?

    - by Victor Rodrigues
    I appreciate a lot CouchDB attempt to use universal web formats in everything it does: RESTFUL HTTP methods in every interaction, JSON objects, javascript code to customize database and documents. CouchDB seems to scale pretty well, but the individual cost to make a request usually makes 'relational' people afraid of. Many small business applications should deal with only one machine and that's all. In this case the scalability talk doesn't say too much, we need more performance per request, or people will not use it. BERT (Binary ERlang Term http://bert-rpc.org/ ) has proven to be a faster and lighter format than JSON and it is native for Erlang, the language in which CouchDB is written. Could we benefit from that, using BERT documents instead of JSON ones? I'm not saying just for retrieving in views, but for everything CouchDB does, including syncing. And, as a consequence of it, use Erlang functions instead of javascript ones. This would modify some original CouchDB principles, because today it is very web oriented. Considering I imagine few people would make their database API public and usually its data is accessed by the users through an application, it would be a good deal to have the ability to configure CouchDB for working faster. HTTP+JSON calls could still be handled by CouchDB, considering an extra cost in these cases because of parsing.

    Read the article

  • In Mercurial, what is the exact step that Peter or me has to do so that he gets back the rolled back

    - by Jian Lin
    The short question is: if I hg rollback, how does Peter get my rolled back version if he cloned from me? What are the exact steps he or me has to do or type? This is related to http://stackoverflow.com/questions/3034793/in-mercurial-when-peter-hg-clone-me-and-i-commit-and-he-pull-and-update-he-g The details: After the following steps, Mary has 7 and Peter has 11. My repository is 7 What are the exact steps Peter or me has to do or type SO THAT PETER GETS 7 back? F:\>mkdir hgme F:\>cd hgme F:\hgme>hg init F:\hgme>echo the code is 7 > code.txt F:\hgme>hg add code.txt F:\hgme>hg commit -m "this is version 1" F:\hgme>cd .. F:\>hg clone hgme hgpeter updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved F:\>cd hgpeter F:\hgpeter>type code.txt the code is 7 F:\hgpeter>cd .. F:\>cd hgme F:\hgme>notepad code.txt [now i change 7 to 11] F:\hgme>hg commit -m "this is version 2" F:\hgme>cd .. F:\>cd hgpeter F:\hgpeter>hg pull pulling from f:\hgme searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (run 'hg update' to get a working copy) F:\hgpeter>hg update 1 files updated, 0 files merged, 0 files removed, 0 files unresolved F:\hgpeter>type code.txt the code is 11 F:\hgpeter>cd .. F:\>cd hgme F:\hgme>hg rollback rolling back last transaction F:\hgme>cd .. F:\>hg clone hgme hgmary updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved F:\>cd hgmary F:\hgmary>type code.txt the code is 7 F:\hgmary>cd .. F:\>cd hgpeter F:\hgpeter>hg pull pulling from f:\hgme searching for changes no changes found F:\hgpeter>hg update 0 files updated, 0 files merged, 0 files removed, 0 files unresolved F:\hgpeter>type code.txt the code is 11 F:\hgpeter>

    Read the article

  • What is wrong with this WHERE clause?

    - by Victor
    Is there a reason why this query doesn't work? The following query will work if I just exclude the WHERE clause. I need to know what is wrong with it. I know the given values of $key exists in the table, so why doesn't this work? $q = "SELECT * WHERE t1.project=$key FROM project_technologies AS t1 JOIN languages AS t2 ON t1.language = t2.key"; Table's have the following fields: project_technologies - key - project - language languages - key - name

    Read the article

  • PHP bitwise left shifting 32 spaces problem and bad results with large numbers arithmetic operations

    - by Victor Stanciu
    Hello, I have the following problems: First: I am trying to do a 32-spaces bitwise left shift on a large number, and for some reason the number is always returned as-is. For example: echo(516103988<<32); // echoes 516103988 Because shifting the bits to the left one space is the equivalent of multiplying by 2, i tried multiplying the number by 2^32, and it works, it returns 2216649749795176448. Second: I have to add 9379 to the number from the above point: printf('%0.0f', 2216649749795176448 + 9379); // prints 2216649749795185920 Should print: 2216649749795185827

    Read the article

  • Ninject - initialise objects

    - by James Lin
    Hi guys, I am new to ninject, I am wondering how I can run custom initizlisation code when constructing the injected objects? ie. I have a Sword class which implements IWeapon, but I want to pass an hit point value to the Sword class constructor, how do I achieve that? Do I need to write my own provider? A minor question, IKernel kernel = new StandardKernel(new Module1(), new Module2(), ...); what is the actual use of having multiple modules in Kernel? I sorta understand it, but could someone give me a formal explaination and use case? Thanks a lot! James

    Read the article

  • In Mercurial, when Peter "hg clone" me, and I commit and he pull and update, he gets my version, but

    - by Jian Lin
    That is, in Mercurial, if Peter cloned from me by hg clone c:\mycode into his e:\code let's say there is a file code.txt and it contains the text the code is 7 Now, when I change it to the code is 11 and hg commit, then he can get my code using hg pull and hg update. Now his version says the code is 11 But if I decide the change was wrong and hg rollback, then my repository should have the 7 version, while the working directory should have the 11 version. So when Peter does an hg pull and hg update, he should be sync'ed up to my current repository, which is the 7, but I found that it is not the case -- he still gets the 11 version. Why is that? Can he get the rolled back code (the 7)? Does Git behave the same way too?

    Read the article

  • In Javascript event handling, why "return false" or "event.preventDefault()" and "stopping the event

    - by Jian Lin
    It is said that when we handle a "click event", returning false or calling event.preventDefault() makes a difference, in which the difference is that preventDefault will only prevent the default event action to occur, i.e. a page redirect on a link click, a form submission, etc. and return false will also stop the event flow. Does that mean, if the click event is registered several times for several actions, using $('#clickme').click(function() { … }) returning false will stop the other handlers from running? I am on a Mac now and so can only use Firefox and Chrome but not IE, which has a different event model, and tested it on FF and Chrome and all 3 handlers ran without any stopping…. so what is the real difference, or, is there a situation where "stopping the event flow" is not desirable? this is related to http://stackoverflow.com/questions/3042036/using-jquerys-animate-if-the-clicked-on-element-is-a-href-a and http://stackoverflow.com/questions/2017755/whats-the-difference-between-e-preventdefault-and-return-false

    Read the article

  • WCF webservice stop working after upgrade to framework 3.5 sp1

    - by Victor
    I have a wcf webservice on one of my testing servers. Everything worked fine until I upgraded frome framework 3.5 to 3.5 sp1. the wcf web service stoped working and returns the error: "Failed to invoke the service. The service may be offline or inaccessible. Refer to the stack trace for details." "The remote server returned an unexpected response: (502) Proxy Error ( The specified network name is no longer available. ). Server stack trace: at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)" Does anyone know what is going on here?

    Read the article

  • How to use V8's built in functions

    - by Victor jiang
    I'm new in both javascript and V8. According to Google's Embedder's Guide, I saw something in the context section talking about built-in utility javascript functions. And I also found some .js files(e.g. math.js) in the downloaded source code, so I tried to write a simple program to call functions in these files, but I failed. Does a context created by Persistent<Context> context = Context::New() have any built-in js functions? How can I access them? Is there a way to first import existing js files as a library(something like src="xxx" type="text/javascript" in HTML page) and then run my own execute script? Can I call google maps api through the embedded V8 library in app? How?

    Read the article

  • How to convert TM-2 degree coordinate to lat lon on Android?

    - by Victor Lin
    I am writing a program that convert TM-2 degree to lat/lon on Android, but I can't find formula for that. I do find some example on internet, but most of them are convert with open source library, that I can't use on Android platform. I also find a java class that do convert from UTM to lat lon, but it seems no suitable for TM 2 degreen coordinate system. So my question is: how do I convert TM 2 degree coordinate to lat/lon? Where can I find formula?

    Read the article

  • Different canonical URLs for Facebook and Google?

    - by Victor P
    The following URLs point to the same resource: http://www.domain.com/books/123 http://www.domain.com/books/123-Harry-Potter http://www.domain.com/books/123-Harry-Potter-And-The-Deathly-Hallows I would like to use (1) as the canonical URL for OpenGraph/Facebook, so if you "like" (2) and (3) then will count for (1). But I would like to use (3) as the canonical URL for Google, because of SEO. Is this recommended?

    Read the article

  • Is there a jQuery webscraper out there?

    - by victor hugo
    I'm trying to pullout some info from an external site using jQuery and Adobe AIR. Right now I'm using a hidden div and jQuery's load function to load fragments of the external site, once the info is loaded I parse some info with selectors. This is fine but it's kinda dirty and I need to perform this several times (don't want to need many hidden divs). Just wondering if anybody knows a good webscrapper written in jQuery or maybe another method I'm missing

    Read the article

  • SQL code editor with syntax highlighing, auto-formatting and code folding

    - by Victor Stanciu
    Hello, Is there any SQL editor that supports syntax highlighting, automatic code formatting and code folding? I found this, but it's an Eclipse plugin (I'm a NetBeans user), and cannot automatically format code, which is the most important feature I'm after. Autocompletion is not important, nor is the possibility of running the code (like the SQL editor in NetBeans). Edit: I'm sorry for not specifying, I'm looking for Linux or even web-based software.

    Read the article

  • if_attribute on declarative authorization. STUCK FOR DAYS!!!

    - by Victor Martins
    I can't seem to find a solution for this problem :s I have a many to many relationship like this: A user has_many organizations through affiliations and vice versa. I'm using declarative organizations and I only want a user to edit a particular organization if he is affiliated and the affiliationtype attribute of affiliation is a particular value. So affiliations has 3 columns , user_id, organization_id and affiliationtype_id I can do: o = Organization.find(:first) o.affiliatons[0].user and get the user now I wish to do this: has_permission_on [:organizations], :to => :edit do if_attribute (...) end That if_attribute should see if the current user is the organization.affiliation[?].user and if the organization.affiliation[?].affiliationtype_id = "3" I hope this is syntax issue ... I really need to get this working. Thanks in advance.

    Read the article

  • How to select a MAX value from column in Query Builder in Kohana framework?

    - by Victor Czechov
    I need to INSERT a data to table, but before a query I must to know the MAX value from column position, than to INSERT a data WHERE my SELECTED before position+1. Is it possible with query builder? following my first comment I did query: $p = DB::select(array(DB::expr('MAX(`position`)', 'p')))->from('supercategories')->execute(); echo $p; the error: ErrorException [ Notice ]: Undefined offset: 1 MODPATH\database\classes\kohana\database.php [ 505 ] 500 */ 501 public function quote_column($column) 502 { 503 if (is_array($column)) 504 { 505 list($column, $alias) = $column; 506 } 507 508 if ($column instanceof Database_Query) 509 { 510 // Create a sub-query

    Read the article

  • if_attribute syntax problem on declarative_authorization

    - by Victor Martins
    I have an Organization that has_many Affiliations And a mission that has_one Organization So i can do this: m = Mission.first m.organization.affiliations A user also has_many affiliations so I can do: u = User.first u.affiliations In declarative_authorization I want a user to be able to manage a mission if he is affiliated to the organization of the mission. I'm trying this: has_permission_on :missions, :to => [:manage] do if_attribute [:affiliations, {:mission => :organization} ] => intersects_with { user.affiliations.type_admin } end But I get the error: [:affiliations, {:mission=>:organization}] is not a symbol What's wrong with the syntax?

    Read the article

  • MFMailComposeViewController broke CSS styles in html template

    - by Victor
    I use MFMailComposeViewController to send a message in html format. If my html template contains the css styles: <div class="margin:10 10 10 0"> <a href="domain.name">Go To</a></div> In this case it works good. But if I send: <a href="domain.name">Go&nbsp;To</a> then I see the letter that comes with broken styles as there (3D is not my misprint) <div style=3D"margin:10 10 10 10;"><a href=3D"www.google.com">Go=C2=A0To</a></div> Well as the letter goes broken when I insert in the template symbols from national alphabets. Somebody can tell what the problem and check with yourself?

    Read the article

  • In database table design, how does "Virtual Goods" affect table design -- should we create an instan

    - by Jian Lin
    When we design a database table for a DVD rental company, we actually have a movie, which is an abstract idea, and a physical DVD, so for each rental, we have a many-to-many table with fields such as: TransactionID UserID DvdID RentedDate RentalDuration AmountPaid but what about with virtual goods? For example, if we let a user rent a movie online for 3 days, we don't actually have a DVD, so we may have a table: TransactionID UserID MovieID RentedDate RentalDuration AmountPaid should we create a record for each instance of "virtual good"? For example, what if this virtual good (the movie) can be authorized to be watched on 3 devices (with 3 device IDs), then should we then create a virtual good record in the VirtualGoods table, each with a VirtualGoodID and then another table that has VirtualGoodID DeviceID to match up the movie with the DeviceIDs? We can also just use the TransactionID as the VirtualGoodID. Are there circumstances where we may want to create a record to record this "virtual good" in a VirtualGoods table?

    Read the article

  • On Ruby on Rails, <%= or <% should only matter whether it is show or no show, but why will it give

    - by Jian Lin
    The following code: <div id="vote_form"> <%= form_remote_tag :url => story_votes_path(@story) do %> <%= submit_tag 'shove it' %> <% end %> </div> gives compilation error while if the first <%= is replaced with <%, then everything works. I thought they only differ by "show" or "not show", but why will it actually cause a compile error? The error is: > SyntaxError in Stories#show > > Showing > app/views/stories/show.html.erb where > line #17 raised: > > compile error C:/Software > Projects/ror/shov12/app/views/stories/show.html.erb:17: > syntax error, unexpected ')' ... > story_votes_path(@story) do ).to_s); > @output_buffer.concat ... > ^ C:/Software > Projects/ror/shov12/app/views/stories/show.html.erb:23: > syntax error, unexpected kENSURE, > expecting ')' C:/Software > Projects/ror/shov12/app/views/stories/show.html.erb:25: > syntax error, unexpected kEND, > expecting ')'

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >