Search Results

Search found 1417 results on 57 pages for 'miguel martin'.

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

  • Assigning specific menu administration rights for roles in drupal

    - by Martin Andersson
    Hello folks. I'm trying to give one of my roles the administrative rights to add/remove content in a specific menu (but not all menus). I think I found a module that should enable something like this, http://drupalmodules.com/module/delegate-menu-administration I've followed the instructions, added the role to my user, checked the "administer some menus" value for that role and checked the "Make admin" field for that role and specific menu in Menus. I also gave the role permissions to change page and story content. However, it still wont let the user add any new content it creates in any menu, and I get an error message saying "warning: Invalid argument supplied for foreach() in /home/martin/www/drupal/modules/delegate_menu_admin/delegate_menu_admin.module on line 346." Line 346 looks like this: foreach ($form['menu']['parent']['#options'] as $key => $value) { I did a print_r($form); in the file just before it and there's no such array that I can see: [menu] => Array ( [#access] => 1 [delete] => Array ( [#access] => ) ) When I gave the role "administer menu" permissions, nothing extra was printed at all, leading me to the assumption that the delegate_menu_admin.module file is not used at all while both the "administer menu" and the "administer some menus" (from the delegate-menu-administration module) permissions are set! Is this some incompatibility between the module because of some drupal update? Or am I just too tired and too stupid? :)

    Read the article

  • CSS: achieving TWO-WAY infinite scroll with mouse drag

    - by Miguel Ping
    Hi, I'm trying to create an infinite scroll component. I'm using this site as a tutorial, but it seems that I can only get the infinite scroll on one way, because when I add elements to the leftmost side, the scrollLeft property auto-adjusts thus the page gets a quirky scroll, jumping instead of making a smooth movement. Is there any way of achieving infinite scroll both-ways? I don't plan to use scrolling buttons, just mouse drag for moving the scroll view.

    Read the article

  • Loading the target of a link in a <DIV> via jQuery's .live event into the same <DIV>??

    - by Martin Pescador
    Hello together I call a certain div from another page with jquery to be loaded into a div on my main page like this: <script type="text/javascript"> $("#scotland").load("http://www.example.com/scotland .gallery"); </script> <div id="scotland"></div> The div I call is a piece of code which is automatically generated by a CMS made simple module, by the way. Now it comes to my problem: The .gallery div I call, looks, a little simplified, like this: <div class="gallery"> <span><img src="http://www.example.com/scotlandimage1.jpg"></span> <span class="imgnavi"><a href="link_to_next_page_with_one_image">Next image</href></span> </div> I want the "next image"-link to load the next page into the .gallery div (it is always a page with one image on it). But what it does, is, it opens the new page http://www.example.com/scotland only. I tried to use jquerys .live event to load the linked page (that would be "scotlandimage2" and the navigation, as you can see in the upper part - not only the image!), but I must have done something wrong. I tried different ways, but never got it to work. This was my last try: $(".imgnavi a").click(function() { var myUrl = $(this).attr("href"); $(".gallery").load(myUrl); return false; }); I have to admit that I am very new to jquery... But does someone know what I did wrong (do I even follow the right handlers?)? Thanks very much in advance! Martin

    Read the article

  • php cpanel

    - by Miguel Ping
    I have a php account with my provider, and I also have cpanel installed for me. I currently have two drupal sites there, let's called the main myMainSite and another one under construction called myNewSite. So when I go to www.myMainSite.com, I go to the main site. When I go to myNewSite.myMainSite.com, i go to the drupal site that is under construction. My question is, when my under construction site goes live, I want that all users that go to www.myMainSite.com see the new site (the one that is under myNewSite.myMainSite.com). How can I accomplish this with cpanel? is it within the "addon domains" configuration? I don't want a redirect that changes the address bar, ie, I want to keep the original url.

    Read the article

  • Inherit from Type class of .Net

    - by Miguel Angelo
    Is there any point at all on inheriting from Type class in .Net? i.e. What could be the meaning of doing so? I am asking this because of this text in MSDN documentation: Notes to Inheritors When you inherit from Type, you must override the following members... list of members. MSDN doc for Type: http://msdn.microsoft.com/en-us/library/system.type.aspx ok, that is actually saying that anyone can inherit from Type... but they dont say why would you ever want to do that. Thanks!

    Read the article

  • How to visualize a list of lists of lists of ... in R?

    - by Martin
    Hi there, I have a very deep list of lists in R. Now I want to print this list to the standard output to get a better overview of the elements. It should look like the way the StatET plugin for eclipse shows a list. Example list: l6 = list() l6[["h"]] = "one entry" l6[["g"]] = "nice" l5 = list() l5[["e"]] = l6 l4 = list() l4[["f"]] = "test" l4[["d"]] = l5 l3 = list() l3[["c"]] = l4 l2 = list() l2[["b"]] = l3 l1 = list() l1[["a"]] = l2 This should print like: List of 1 $ a:List of 1 ..$ b:List of 1 .. ..$ c:List of 2 .. .. ..$ f: chr "test" .. .. ..$ d:List of 1 .. .. .. ..$ e:List of 2 .. .. .. .. ..$ h: chr "one entry" .. .. .. .. ..$ g: chr "nice" I know this is possible with recursion and the deepness. But is there a way to do this with the help of rapply or something like that? Thanx in advance, Martin

    Read the article

  • Dereferencing pointers without pointing them at a variable

    - by Miguel
    I'm having trouble understanding how some pointers work. I always thought that when you created a pointer variable (p), you couldn't deference and assign (*p = value) unless you either malloc'd space for it (p = malloc(x)), or set it to the address of another variable (p = &a) However in this code, the first assignment works consistently, while the last one causes a segfault: typedef struct { int value; } test_struct; int main(void) { //This works int* colin; *colin = 5; //This never works test_struct* carter; carter->value = 5; } Why does the first one work when colin isn't pointing at any spare memory? And why does the 2nd never work? I'm writing this in C, but people with C++ knowledge should be able to answer this as well.

    Read the article

  • Why does ANTLR not parse the entire input?

    - by Martin Wiboe
    Hello, I am quite new to ANTLR, so this is likely a simple question. I have defined a simple grammar which is supposed to include arithmetic expressions with numbers and identifiers (strings that start with a letter and continue with one or more letters or numbers.) The grammar looks as follows: grammar while; @lexer::header { package ConFreeG; } @header { package ConFreeG; import ConFreeG.IR.*; } @parser::members { } arith: term | '(' arith ( '-' | '+' | '*' ) arith ')' ; term returns [AExpr a]: NUM { int n = Integer.parseInt($NUM.text); a = new Num(n); } | IDENT { a = new Var($IDENT.text); } ; fragment LOWER : ('a'..'z'); fragment UPPER : ('A'..'Z'); fragment NONNULL : ('1'..'9'); fragment NUMBER : ('0' | NONNULL); IDENT : ( LOWER | UPPER ) ( LOWER | UPPER | NUMBER )*; NUM : '0' | NONNULL NUMBER*; fragment NEWLINE:'\r'? '\n'; WHITESPACE : ( ' ' | '\t' | NEWLINE )+ { $channel=HIDDEN; }; I am using ANTLR v3 with the ANTLR IDE Eclipse plugin. When I parse the expression (8 + a45) using the interpreter, only part of the parse tree is generated: http://imgur.com/iBaEC.png Why does the second term (a45) not get parsed? The same happens if both terms are numbers. Thank you, Martin Wiboe

    Read the article

  • Oracle syntax - should we have to choose between the old and the new?

    - by Martin Milan
    Hi, I work on a code base in the region of about 1'000'000 lines of source, in a team of around eight developers. Our code is basically an application using an Oracle database, but the code has evolved over time (we have plenty of source code from the mid nineties in there!). A dispute has arisen amongst the team over the syntax that we are using for querying the Oracle database. At the moment, the overwhelming majority of our queries use the "old" Oracle Syntax for joins, meaning we have code that looks like this... Example of Inner Join select customers.*, orders.date, orders.value from customers, orders where customers.custid = orders.custid Example of Outer Join select customers.custid, contacts.ContactName, contacts.ContactTelNo from customers, contacts where customers.custid = contacts.custid(+) As new developers have joined the team, we have noticed that some of them seem to prefer using SQL-92 queries, like this: Example of Inner Join select customers.*, orders.date, orders.value from customers inner join orders on (customers.custid = orders.custid) Example of Outer Join select customers.custid, contacts.ContactName, contacts.ContactTelNo from customers left join contacts on (customers.custid = contacts.custid) Group A say that everyone should be using the the "old" syntax - we have lots of code in this format, and we ought to value consistency. We don't have time to go all the way through the code now rewriting database queries, and it wouldn't pay us if we had. They also point out that "this is the way we've always done it, and we're comfortable with it..." Group B however say that they agree that we don't have the time to go back and change existing queries, we really ought to be adopting the "new" syntax on code that we write from here on in. They say that developers only really look at a single query at a time, and that so long as developers know both syntax there is nothing to be gained from rigidly sticking to the old syntax, which might be deprecated at some point in the future. Without declaring with which group my loyalties lie, I am interested in hearing the opinions of impartial observers - so let the games commence! Martin. Ps. I've made this a community wiki so as not to be seen as just blatantly chasing after question points...

    Read the article

  • Problems uploading pictures to Facebook wall.

    - by Miguel Ángel Ortuño
    Hi, i'm trying to upload a JPEG picture to Facebook wall using libcurl. Appareantly the connection is established but cURL hangs when waiting for server response. The libcurl output is the following: About to connect() to api.facebook.com port 80 (#0) Trying 66.220.146.15... * connected Connected to api.facebook.com (66.220.146.15) port 80 (#0) POST /restserver.php?api_key=e57addd5a98ac4445e36359043ded182&call_id=3&caption=ddfg&format=JSON&method=facebook.photos.upload&session_key=a3fc731e4c0329201606daeb-723233322&sig=a3f32226cff3e49ec799cf7dcc17a57e&ss=1&v=1.0?method=photos.upload HTTP/1.1 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 Host: api.facebook.com Accept: / Content-Type: multipart/form-data; charset=UTF-8; boundary=PPoSt_dElImTTer MIME-version: 1.0 Content-Length: 128033 Expect: 100-continue Done waiting for 100-continue And the C++ code is as follow: String post_header = "Content-Type: multipart/form-data; charset=UTF-8; boundary=PPoSt_dElImTTer\r\nMIME-version: 1.0\r\n"; // POST binary data curl_slist* chunk = NULL; chunk = curl_slist_append(chunk, post_header.c_str()); curl_easy_setopt(m_http, CURLOPT_HTTPHEADER, chunk); curl_easy_setopt(m_http, CURLOPT_POST, true); curl_easy_setopt(m_http, CURLOPT_POSTFIELDS, buf); curl_easy_setopt(m_http, CURLOPT_POSTFIELDSIZE, all_size); curl_easy_setopt(m_http, CURLOPT_URL, m_request.c_str()); curl_easy_setopt(m_http, CURLOPT_WRITEFUNCTION, Facebook::Request::httpCallback); curl_easy_setopt(m_http, CURLOPT_WRITEDATA, this); curl_easy_setopt(m_http, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14"); curl_easy_setopt(m_http, CURLOPT_VERBOSE, true);

    Read the article

  • Is there anyway to exclude artifacts inherited from a parent POM?

    - by Miguel
    Artifacts from dependencies can be excluded by declaring an <exclusions> element inside a <dependency> But in this case it's needed to exclude an artifact inherited from a parent project. An excerpt of the POM under discussion follows: <project> <modelVersion>4.0.0</modelVersion> <groupId>test</groupId> <artifactId>jruby</artifactId> <version>0.0.1-SNAPSHOT</version> <parent> <artifactId>base</artifactId> <groupId>es.uniovi.innova</groupId> <version>1.0.0</version> </parent> <dependencies> <dependency> <groupId>com.liferay.portal</groupId> <artifactId>ALL-DEPS</artifactId> <version>1.0</version> <scope>provided</scope> <type>pom</type> </dependency> </dependencies> </project> base artifact, depends on javax.mail:mail-1.4.jar, and ALL-DEPS depends on another version of the same library. Due to the fact that mail.jar from ALL-DEPS exist on the execution environment, although not exported, collides with the mail.jar that exists on the parent, which is scoped as compile. A solution could be to rid off mail.jar from the parent POM, but most of the projects that inherit base, need it (as is a transtive dependency for log4j). So What I would like to do is to simply exclude parent's library from the child project, as it could be done if base was a dependency and not the parent pom: ... <dependency> <artifactId>base</artifactId> <groupId>es.uniovi.innova</groupId> <version>1.0.0</version> <type>pom<type> <exclusions> <exclusion> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> </exclusion> </exclusions> </dependency> ...

    Read the article

  • Running an executable on network share with CustomAction with wix?

    - by martin
    Hello, i have created a msi-package which compresses some xml-files to a zip-file during installation. I have created a CustomAction for this purposes: <CustomAction Id="CompressMy" BinaryKey="zipEXE" ExeCommand="a -tzip &quot;[TEMPLATE_DIR]my.zip&quot; &quot;[TempSourceFolder]data.xml&quot;" Return="check" HideTarget="no" Impersonate="no" Execute="deferred" /> The installation works fine, if i try to install to a local drive, but recently a customer wanted to install [TEMPLATE_DIR] to a network drive on Windows Vista. The CustomAction fails, because of the elevated install-user hasn't mapped the network drive, even if the installer-calling user has mapped the drive. This happens also, if I try to install to an unc-path. I use 7zip for compressing. I have added it to my msi-package. I have tried to set Impersonate="yes", but then the Installations fails, if my TEMPLATE_DIR is f.e. the ProgramData-dir. Do you have any idea what i can do? I thinked about checking if TEMPLATE_DIR is a network path, but I didn't know how i can check this. Or do you have any other Ideas how I can provide a local and a network installation while using this custom action. Would be great if there are any advices, greetings, Martin

    Read the article

  • How to remove adornments like [exec] when using groovy's AntBuilder

    - by Miguel Pardal
    Hi! I'm using Groovy's AntBuilder to execute Ant tasks: def ant = new AntBuilder() ant.sequential { ant.exec(executable: "cmd", dir: "..", resultproperty: "exec-ret-code") { arg(value: "/c") arg(line: "dir") } } The output lines are prefixed by: [exec] Using Ant on the command line, this is turned off by "emacs mode" ant -emacs ... Is there a way to switch to emacs mode using AntBuilder?

    Read the article

  • Guidelines of when to use locking

    - by miguel
    I would like to know if there are any guidelineswhich a developer should follow as to when (and where) to place locks. For instance: I understand that code such as this should be locked, to avoid the possibility of another thread changing the value of SomeHeapValue unexpectedly. class Foo { public SomeHeapObject myObject; public void DoSummat(object inputValue_) { myObject.SomeHeapValue = inputValue_; } } My question is, however, how deep does one go with the locking? For instance, if we have this code: class Foo { public SomeHeapObject myObject; public void DoSummat(object inputValue_) { myObject.SomeHeapValue = GetSomeHeapValue(); } } Should we lock in the DoSummat(...) method, or should we lock in the GetSomeHeapValue() method? Are there any guidelines that you all keep in mind when strcturing multi-threaded code?

    Read the article

  • HierarchicalDataTemplate Distinct leaves

    - by miguel
    I have a set of data that is structured like this: ItemA.GroupA ItemB.GroupA ItemC.GroupB ItemD.GroupC I need to present the data in a WPF Tree View like this: GroupA --- ItemA --- ItemB GroupB --- ItemC GroupC --- ItemD What XAML can I use to group the leaves by distinct value? For instance, there could be multple items in the collection which are GroupA.ItemA, however, I only want to present the node and leaf once.

    Read the article

  • jQuery attach function to 'load' event of an element

    - by Miguel Ping
    Hi, I want to attach a function to a jQuery element that fires whenever the element is added to the page. I've tried the following, but it didn't work: var el = jQuery('<h1>HI HI HI</H1>'); el.one('load', function(e) { window.alert('loaded'); }); jQuery('body').append(el); What I really want to do is to guarantee that another jQuery function that is expecting some #id to be at the page don't fail, so I want to call that function whenever my element is loaded in the page. To clarify, I am passing the el element to another library (in this case it's a movie player but it could be anything else) and I want to know when the el element is being added to the page, whether its my movie player code that it is adding the element or anyting else.

    Read the article

  • Thread Local Storage and local method variables

    - by miguel
    In c#, each thread has its own stack space. If this is the case, why is the following code not thread-safe? (It is stated that this code is thread-safe on this post: Locking in C# class Foo { private int count = 0; public void TrySomething() { count++; } } As count is an int (stack variable), surely this value would be isolated to an individual thread, on its own stack, and therefore thread-safe? I am probably missing something here, but I dont understand what is actually in Thread Local Storage if not stack-based variables for the thread?

    Read the article

  • How to access elements in a complex list?

    - by Martin
    Hi, it's me and the lists again. I have a nice list, which looks like this: tmp = NULL t = NULL tmp$resultitem$count = "1057230" tmp$resultitem$status = "Ok" tmp$resultitem$menu = "PubMed" tmp$resultitem$dbname = "pubmed" t$resultitem$count = "305215" t$resultitem$status = "Ok" t$resultitem$menu = "PMC" t$resultitem$dbname = "pmc" tmp = c(tmp, t) t = NULL t$resultitem$count = "1" t$resultitem$status = "Ok" t$resultitem$menu = "Journals" t$resultitem$dbname = "journals" tmp = c(tmp, t) Which produces: str(tmp) List of 3 $ resultitem:List of 4 ..$ count : chr "1057230" ..$ status: chr "Ok" ..$ menu : chr "PubMed" ..$ dbname: chr "pubmed" $ resultitem:List of 4 ..$ count : chr "305215" ..$ status: chr "Ok" ..$ menu : chr "PMC" ..$ dbname: chr "pmc" $ resultitem:List of 4 ..$ count : chr "1" ..$ status: chr "Ok" ..$ menu : chr "Journals" ..$ dbname: chr "journals" Now I want to search through the elements of each "resultitem". I want to know the "dbname" for every database, that has less then 10 "count" (example). In this case it is very easy, as this list only has 3 elements, but the real list is a little bit longer. This could be simply done with a for loop. But is there a way to do this with some other function of R (like rapply)? My problem with those apply functions is, that they only look at one element. If I do a grep to get all "dbname" elements, I can not get the count of each element. rapply(tmp, function(x) paste("Content: ", x))[grep("dbname", names(rapply(tmp, c)))] Does someone has a better idea than a for loop? Thanx, Martin

    Read the article

  • How are DynamicResources built?

    - by miguel
    Are dynamic resources truly dynamic? If I define a DynamicResource, I realise that an expression is created (where?) that is not translated into a resource until runtime, however, What I do not understans is whether this dynamicresouce, once built, is now "Static" For instance, if I create a context menu via a dynamicresource, are the menuitems which are created at runtime on access then static, even if they are bound?

    Read the article

  • start-stop-daemon quoted arguments misinterpreted

    - by Martin Westin
    Hi, I have been trying to make an init script using start-stop-daemon. I am stuck on the arguments to the daemon. I want to keep these in a variable at the top of the script but I can't get the quotations to filter down correctly. I'll use ls here so we don't have to look at binaries and arguments that most people wont know or care about. The end result I am looking for is for start-stop... to run ls -la "/folder with space/" DAEMON=/usr/bin/ls DAEMON_OPTS='-la "/folder with space/"' start-stop-daemon --start --make-pidfile --pidfile $PID --exec $DAEMON -- $DAEMON_OPTS Double escaping the options and trying innumerable variations of quotations do not help... Then they end up at the daemon they are always messed up. Enclosing $DAEMON_OPTS in quotes changes things... then they are seen as one since quote... never the right number though :) Echoing the command-line (start-stop...) prints exactly the right stuff to screen. But the daemon (the real one, not ls) complains about the wrong number of arguments. How do I specify a variable so that quotes inside it are brought along to the daemon correctly? Thanks, Martin

    Read the article

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