Daily Archives

Articles indexed Wednesday May 12 2010

Page 13/121 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Facebook Privacy Permissions Design

    - by Ian
    Does anyone know the general layout of how facebook's privacy permissions system works (database)? I've been trying to figure out how they manage to have such a complex set of rules be applied to various content on their site, yet it remains fast. How are they doing that?

    Read the article

  • execute javascript method after completing code behind method ?

    - by James123
    I can execute below callback() method after completion of document.getElementById('btnDownload').click(); .This Click is Code behind method. Now it is executing immediatly. I want wait "Click()" process done then Execute callback(); method. function LoadPopup() { // find the popup behavior this._popup = $find('mdlPopup'); // show the popup this._popup.show(); // synchronously run the server side validation ... document.getElementById('btnDownload').click(); callback(); } function callback() { this._popup = $find('mdlPopup'); // hide the popup this._popup.hide(); alert("hi"); }

    Read the article

  • No supported translation to SQL

    - by derans
    We have this code: private IList<InfoRequest> GetBy(Func<InformationRequest, string> func, string searchby) { var requests = _dc.InformationRequests .Where(x => func.Invoke(x).Contains(searchby)) .OrderBy(y => y.RequestDate); return Mapper.Map<InformationRequest[], InfoRequest[]>(requests.ToArray()); } It continues to throw the no supported translation to SQL error. Any ideas on the problem or how to resolve it?

    Read the article

  • Compile error when calling ToList() when accessing many to many with Linq To Entities

    - by KallDrexx
    I can't figure out what I am doing wrong. I have the following method: public IList<WObject> GetRelationshipMembers(int relId) { var members = from r in _container.ObjectRelationships where r.Id == relId select r.WObjects; return members.ToList<WObject>(); } This returns the following error: Instance argument: cannot convert from 'System.Linq.IQueryable<System.Data.Objects.DataClasses.EntityCollection<Project.DomainModel.Entities.WObject>>' to 'System.Collections.Generic.IEnumerable<Project.DomainModel.Entities.WObject>' How can I convert the EntityCollection to a list without lazy loading?

    Read the article

  • What is wrong with the below statement(C#3.0 / Lambda)

    - by Newbie
    what is wrong in the below Enumerable.Range(0, objEntityCode.Count - 1).Select(i => { options.Attributes[i] = new EntityCodeKey { EntityCode = objEntityCode[i].EntityCodes , OrganizationCode = Constants.ORGANIZATION_CODE }; }) .ToArray(); Throwing error The type arguments for method 'System.Linq.Enumerable.Select(System.Collections.Generic.IEnumerable, System.Func)' cannot be inferred from the usage. Try specifying the type arguments explicitly. But this works Enumerable.Range(0, objEntityCode.Count - 1).ToList().ForEach(i => { options.Attributes[i] = new EntityCodeKey { EntityCode = objEntityCode[i].EntityCodes , OrganizationCode = Constants.ORGANIZATION_CODE }; } ); Using C#3.0. Purpose: I am learning LINQ / LAMBDA and trying to do the same program in different way. Thanks.

    Read the article

  • update query with join on two tables

    - by dba_query
    I have customer and address tables. query: select * from addresses a, customers b where a.id = b.id returns 474 records For these records, I'd like to add the id of customer table into cid of address table. Example: If for the first record the id of customer is 9 and id of address is also 9 then i'd like to insert 9 into cid column of address table. I tried: update addresses a, customers b set a.cid = b.id where a.id = b.id but this does not seem to work.

    Read the article

  • Ret Failure with SDL using FASM on Win32

    - by Jon Purdy
    I'm using SDL with FASM, and have code that's minimally like the following: format ELF extrn _SDL_Init extrn _SDL_SetVideoMode extrn _SDL_Quit extrn _exit SDL_INIT_VIDEO equ 0x00000020 section '.text' public _SDL_main _SDL_main: ccall _SDL_Init, SDL_INIT_VIDEO ccall _SDL_SetVideoMode, 640, 480, 32, 0 ccall _SDL_Quit ccall _exit, 0 ; Success, or ret ; failure. With the following quick-and-dirty makefile: SOURCES = main.asm OBJECTS = main.o TARGET = SDLASM.exe FASM = C:\fasm\fasm.exe release : $(OBJECTS) ld $(OBJECTS) -LC:/SDL/lib/ -lSDLmain -lSDL -LC:/MinGW/lib/ -lmingw32 -lcrtdll -o $(TARGET) --subsystem windows cleanrelease : del $(OBJECTS) %.o : %.asm $(FASM) $< $@ Using exit() (or Windows' ExitProcess()) seems to be the only way to get this program to exit cleanly, even though I feel like I should be able to use retn/retf. When I just ret without calling exit(), the application does not terminate and needs to be killed. Could anyone shed some light on this? It only happens when I make the call to SDL_SetVideoMode().

    Read the article

  • accepts_nested_attributes_for and has_many :through relations.

    - by antiarchitect
    I want to make a simple examing application on RoR 2.3. The problem area is to make an exam_session in a one form with only one submit action. For the exam session there are selected some number of questions from the question pool in random order. For these questions there are selected some number of alternatives (to check is this a single answer question or multi answer question I use the number of correct alternatives: if only 1 - single, 1 - multi. Radiobuttons or checkboxes in form to answer depends on it). I have models: Questions ---< Alternative and ExamSession. I think there must be has_many :through relations between ExamSession and Questions and has_many :through relation between the intermediate table (for example QuestionsExamSession) and Alternative to point what alternatives are answers of the student on this Question. So the questions are: Is this scheme is too complicated and there is a way to do it simple and clear? Is there any way to organize models in such a way to make the form I want to work?

    Read the article

  • parsing a string of ascii text into separate variables

    - by jml
    Hi there, I have a piece of text that gets handed to me like: here is line one\n\nhere is line two\n\nhere is line three What I would like to do is break this string up into three separate variables. I'm not quite sure how one would go about accomplishing this in python. Thanks for any help, jml

    Read the article

  • GetIpAddrTable() leaks memory. How to resolve that?

    - by Stabledog
    On my Windows 7 box, this simple program causes the memory use of the application to creep up continuously, with no upper bound. I've stripped out everything non-essential, and it seems clear that the culprit is the Microsoft Iphlpapi function "GetIpAddrTable()". On each call, it leaks some memory. In a loop (e.g. checking for changes to the network interface list), it is unsustainable. There seems to be no async notification API which could do this job, so now I'm faced with possibly having to isolate this logic into a separate process and recycle the process periodically -- an ugly solution. Any ideas? // IphlpLeak.cpp - demonstrates that GetIpAddrTable leaks memory internally: run this and watch // the memory use of the app climb up continuously with no upper bound. #include <stdio.h> #include <windows.h> #include <assert.h> #include <Iphlpapi.h> #pragma comment(lib,"Iphlpapi.lib") void testLeak() { static unsigned char buf[16384]; DWORD dwSize(sizeof(buf)); if (GetIpAddrTable((PMIB_IPADDRTABLE)buf, &dwSize, false) == ERROR_INSUFFICIENT_BUFFER) { assert(0); // we never hit this branch. return; } } int main(int argc, char* argv[]) { for ( int i = 0; true; i++ ) { testLeak(); printf("i=%d\n",i); Sleep(1000); } return 0; }

    Read the article

  • parsing a string based on specified identifiers

    - by jml
    Let's say that I have the following text: input = "one aaa and bbb two bbbb er ... // three cccc" I would like to parse this into a group of variables that contain criteria = ["one", "two", "three"] v1,v2,v3 = input.split(criteria) I know that the example above won't work, but is there some utility in python that would allow me to use this sort of approach? I know what the identifiers will be in advance, so I would think that there has got to be a way to do this... Thanks for any help, jml

    Read the article

  • Rails - How do you test ActionMailer sent a specific email in tests

    - by adam
    Currently in my tests I do something like this to test if an email is queued to be sent assert_difference('ActionMailer::Base.deliveries.size', 1) do get :create_from_spreedly, {:user_id => @logged_in_user.id} end but if i a controller action can send two different emails i.e. one to the user if sign up goes fine or a notification to admin if something went wrong - how can i test which one actually got sent. The code above would pass regardless.

    Read the article

  • Where will log4net create this log file?

    - by Blankman
    When I set the file value to 'logs\log-file.txt' where exactly will it create this folder? in the /bin directory? My web.config looks like: <log4net> <appender name="FileAppender" type="log4net.Appender.FileAppender"> <file value="logs\log-file.txt" /> <appendToFile value="true" /> <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" /> </layout> </appender> </log4net> is this the correct way to log: ILog logger = LogManager.GetLogger(typeof(CCController)); logger.Error("Some Page", ex); // where ex is the exception instance

    Read the article

  • How to mount a drive with read only permission

    - by Master
    I am using this is fstab to mount the partition at backup. /dev/sda5 /media/virtual ntfs defaults 0 0 When i reboot the permissions are automatically set to 777. I want that only one user i.e userA can read and write , all others should not see the contents of that drive. What should i do anything like /dev/sda5 /media/virtual ntfs userA 700 defaults 0 0

    Read the article

  • Editting HD Quicktime .mov files in Windows

    - by NoCarrier
    I recently purchased one of those new wave of point & shoot digicams (canon SD780) that shoot high definition 720p video. Unfortunately it only writes to Quicktime files. How can I go about editing these in Windows without spending any money? I found a few MOV to AVI or WMV converters but am experiencing some quality degradation in the output.

    Read the article

  • WebCenter .NET Accelerator - Microsoft SharePoint Data via WSRP

    - by john.brunswick
    Platforms in the enterprise will never be homogeneous. As much as any vendor would enjoy having their single development or application technology be exclusively adopted by customers, too much legacy, time, education, innovation and vertical business needs exist to make using a single platform practical. JAVA and .NET are the two industry application platform heavyweights and more often than not, business users are leveraging various systems in their day to day activities that incorporate applications developed on top of both platforms. BEA Systems acquired Plumtree Software to complete their "liquid" view of data, stressing that regardless of a particular source system heterogeneous data could interoperate at not only through layers that allowed for data aggregation, but also at the "glass" or UI layer. The technical components that allowed the integration at the glass thrive today at Oracle, helping WebCenter to provide a rich composite application framework. Oracle Ensemble and the Oracle .NET Application Accelerator allow WebCenter to consume and interact with the UI layers provided by .NET applications and a series of other technologies. The beauty of the .NET accelerator is that it can consume any .NET application and act as a Web Services for Remote Portlets (WSRP) producer. I recently had a chance to leverage the .NET accelerator to expose a ASP .NET 2.0 (C#) application in the WebCenter UI (pictured above) and wanted to share a few tips to help others get started with similar integrations. I was using two virtual machines for the exercise - one with Windows Server 2003, running SharePoint and the other running WebCenter Spaces 11g. For my sample application data I ended up using SharePoint 2007 lists and calendars (MOSS 2007) to supply results using a .NET API for SharePoint.

    Read the article

  • EBS + 11g Database Upgrade Best Practices Whitepaper Available

    - by Steven Chan
    I returned from OAUG/Collaborate with a cold and multiple overlapping development crises.  Fun.  Now that those are (mostly) out of the way, it's time to get back to clearing out my article backlog.  Premier Support for the 10gR2 database ends in July 2010.  If you haven't already started planning your 11g database upgrade, we recommend that you start soon.  We have certified both the 11gR1 (11.1.0.7) and 11gR2 (11.2.0.1) databases with Oracle E-Business Suite; see this blog's Certification summary to links to articles with the details.Our Applications Performance Group has reminded me that they have a whitepaper loaded with practical tips intended to make your 11g database upgrade easier.  No vacuous marketing rhetoric here -- this is strictly written for DBAs.  A must-read if you haven't already upgraded to either 11gR1 or 11gR2, and highly recommended even if you have.  You can download this whitepaper here:Upgrade to 11g Performance Best Practices (PDF, 184K)

    Read the article

  • China's Search Engines

    As the Internet becomes an increasingly valuable tool for reaching people around the world, businesses can use the Internet and search engines to target an audience in one of the world's biggest economies: China. Recently, there has been great changes in search engines in the Chinese market.

    Read the article

  • 4 SEO Trick Schemes to Avoid

    With the increasing influence and change of marketing focus to Internet, we have the usual unsavoury characters arriving on the scene. Where there is money, there is a scam. SMEs are particularly vulnerable to this as most do not have the resources, the time or the knowledge to distinguish a genuine SEO company from the fraudsters.

    Read the article

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