id
stringlengths
3
6
prompt
stringlengths
100
55.1k
response_j
stringlengths
30
18.4k
156950
``` <div class="row"> <?php $r=mysql_query("SELECT * FROM advertisements WHERE $filter exposure!='0' AND `status`='2' AND (clicks_left_micro>0 OR clicks_left_mini>0 OR clicks_left_standard>0 OR clicks_left_extended>0) ORDER BY exposure DESC"); while($ar=mysql_fetch_array($r)): echo "<div class='span4'> text here ...
Why not try [jQuery post](http://api.jquery.com/jQuery.post/)? Example ``` <input type="text" name="text" id="text"> <div id="content" name="content"> <script> $('#text').keyup(function(){ $.post('posttothis.php', {text:$('#text').val()}, function(data) { $("#content").html(data); ...
157028
I have an AngularJS front-end, which uses Restangular to make a call to the backend through a Java Servlet, which returns JSON data, which is then parsed to make a chart using Charts.js **Angular Factory** ``` app.factory('graphService', function($http, Restangular) { var exports = {}; expor...
Try this : ``` //Select the first 2 elements of each row var rowSize = 4; $("div.col-sm-6").filter(function() { return $(this).index() % rowSize < 2; }); ``` **Demo:** ```js $("div.col-sm-6").filter(function() { return $(this).index() % 4 < 2 }).addClass('selected'); ``` ```css .selected { background-c...
157124
See if i can get it working here: <https://codepen.io/canovice/pen/pVoBXJ> I have searched a bit for this answer but have had no luck resolving the issue. Here is a screenshot of an anchor tag in a react component of mine: [![enter image description here](https://i.stack.imgur.com/XToHn.png)](https://i.stack.imgur.co...
Simple : ``` IO.Stream st1 ///Set MultiSelect property to true openfiledialog1.MultiSelect = true; ///Now get the filenames if (openfiledialog1.ShowDialog() == DialogResult.OK) { foreach (String file in openfiledialog1.FileNames) { try { if ((st1 = openfiledialog1.OpenFile())...
157360
This is my sql query ``` SELECT a.CLASS_ID,a.ACTIVITY_TYPE_ID,COUNT(*) FROM AIS.CLASS_ASSESSMENT_DATE_INFO a WHERE a.CLASS_ID =22222 GROUP by a.CLASS_ID,a.ACTIVITY_TYPE_ID ``` I want to convert this query to linq query. Can you help me ?
Try this:- ``` var result = db.CLASS_ASSESSMENT_DATE_INFO.Where(x => x.CLASS_ID == 22222) .GroupBy(x => new { x.CLASS_ID, x.ACTIVITY_TYPE_ID }) .Select(x => new { CLASS_ID = x.Key.CLASS_ID, ACTIVITY_TYPE_ID ...
157776
I am new to Magento and maybe its a very basic question, but I want to display Pre-Order products on my home page. I have created an attribute `Product_Release_Date` and set it to a future date. When I try to get `Product_Release_Date` its returning blank. What I am doing wrong? ``` $_productCollection=$this->getLoade...
If you want to know whenever the Activity ceases to become visible (for whatever reason), override onPause (see <http://developer.android.com/reference/android/app/Activity.html>). As an aside, as a user, I would want this behaviour - if I move away from an Activity without pressing the back button or quit, I am hopin...
158499
I'm currently getting troubled with the react router dom@6. Like, I want to redirect users to other pages If they logged in. But when I use Navigate component It threw error saying that : "[Navigate] is not a component. All component children of Routes must be a Route or React.Fragment" Though I have wrapped it in th...
Edit: This is also a possible solution, drawback is that you cant redirect properly. You just have to make sure that you have the fallbackroutes set up right. ``` {isSignedIn && <Route path="" element={} />} ``` I would recommend using an AuthRout to wrap your Routes. ```js function AuthRoute ({children}) { if(!...
158783
I have a custom block loading products on my front page that loads the four newest products that have a custom product picture attribute set via: ``` $_helper = $this->helper('catalog/output'); $_productCollection = Mage::getModel("catalog/product")->getCollection(); $_productCollection->addAttributeToSelect('*'); $_p...
It seems you asked this same question in another thread, so to help others who might be searching for an answer, I'll anser it here as well: I imagine this is some sort of magento bug. The issue seems to be that the Magento core is not setting the custom\_image\_label attribute. Whereas for the default built-in image...
159719
Is there an equivalent to `getopt()` in the visual studio CRT? Or do I need to get it and compile it with my project? **Edit** clarification `getopt` is a utility function in the unix/linux C Run Time library for common command line parsing chores i.e. parsing arguments of the form `-a -b` `-f someArg` etc'
Advice: boost::program\_options instead. <http://www.boost.org/doc/libs/1_41_0/doc/html/program_options.html>
159784
I have a normal list, and I want to change the element of that list every 25 indexes (starting by the second index). So I've created a loop to generate that number and store it in a list (i.e 2,27,52,77....). Then I've printed every item of that index, but for now I can't seem to find a way to work with re.sub. I want ...
To match the text you can use: ``` new_str = re.sub(r'\s+Title\s+=', 'Author =', old_str) ``` `\s` means whitespace, `+` means one or more. You can use `\s{4}` to match exactly 4 whitespaces, or as many as you need. More info [here](https://docs.python.org/3/library/re.html). Alternatively, you ca...
159808
Well, I would make it easier to add smileys and the code it should be replaced with a bit easier, So insted of creating 2 arrays, I would like to only have one. So this is a example how I wanted it. $Smileys = array(":D" => ""); So instead of using it like $Smileys = array(":D"); $SmileyReplace = array(""); But is it...
You can try to use it in one function by spliting the array into two using buildin functions eg: ``` ... return str_replace(array_keys($Smileys), array_values($Smileys), $Data) ``` **EDIT:** Keep in mind that those functions do a copy of the array so propably there are better solutions than spliting one array into t...
159898
I have set an event-observer in my custom module but observer is not getting called. i have enabled my log and i am getting this warning : ``` 2013-08-14T11:17:48+00:00 ERR (3): Warning: include(Mage/CompanyName/ModuleName/Model/Observer.php): failed to open stream: No such file or directory in /var/www/nyp/lib/Varie...
I think [this post](http://codegento.com/2011/04/observers-and-dispatching-events/) should help you. In your case it would be something like this: ``` <global> <events> <sales_order_place_after> <observers> <modulename_observername> <type>singleton</type> ...
159998
I am very to Modern UI Programming and now i got stuck in a small C# WPF Application which is basically a learning project of MVVM design pattern. I have a DataGrid and some Buttons to handle data operation (add, edit, delete). What i want to achieve: the edit button should not be enable, when no row in grid is selec...
Java implements Generics using [Erasure](https://docs.oracle.com/javase/tutorial/java/generics/erasure.html). That means that at run-time, the JVM can't know what types are associated with the Generic class/method/object/whatever. There are hacks and workarounds that can be used to try to work with this, but this is a ...
160928
Trying to restore an Amazon S3 object from GLACIER with the code below. ``` import boto3 s3 = boto3.resource('s3', verify=False) bucket_name = r"my-source-bucket" bucket = s3.Bucket(bucket_name) key ="glacier_file2.txt" try: bucket.meta.client.restore_object(Bucket=bucket_name, Key=key, RestoreRequest={'Days': ...
After doing a little more research, it appears that a "restore" is not what one would expect. Once an object goes to GLACIER there is no going back, other than "temporarily" restoring it (like I've done above) and then overwriting it. For example, I was able to run this command after restoring glacier\_file2.txt ``` a...
161046
ideally, I'd like to get the name of the property referenced by a KeyPath. But this seems not to be possible out-of-the-box in Swift. So my thinking is that the KeyPath could provide this information based on protocol extension added by a developer. Then I'd like to design an API with an initializer/function that acce...
You are misunderstanding conditional conformance. You seem to want to do this in the future: ``` extension KeyPath: KeyPathPropertyNameProviding where Root == Person { var propertyName: String { switch self { case \Person.name: return "name" case \Person.age: return "age" ...
161452
I'm using Rails 3 for the first time (especially asset pipelining and less-rails-bootstrap), so I might be missing some really basic concept here. I've tried two approaches for including the Twitter bootstrap CSS into my project and both have problems. **Approach #1:** `app/assets/stylesheets/application.css` has `req...
Your answer is sufficient if you want to exclusively use the default twitter bootstrap variables. If you find yourself wanting to override the variables and have them applied to BOTH twitter bootstrap's styles AND your own styles, you'll need to do separate out your variables into its own myvariables.less file and have...
161535
I have a method which tests for the existence of a file prior to carrying out some manipulation of file content as follows: ``` Private Sub AddHeaderToLogFile() ''#Only if file does not exist If Not File.Exists(_logPath) Then Dim headerLogger As Logger headerLogger = LogManager.GetLogger("Heade...
Short answer : of course it makes sense, you can apply a CPS-transform directly, you will only have lots of cruft because each argument will have, as you noticed, its own attached continuation In your example, I will consider that there is a `+(x,y)` uncurried primitive, and that you're asking what is the translation ...
161566
I am using LWJGL and I want to cause an event to rapidly take place when I press and hold a key (like holding a letter key in word). This is my attempt: ``` while(Keyboard.next()) { if (Keyboard.getEventKeyState()) { if (Keyboard.isKeyDown(Keyboard.KEY_UP)) { i += 5.0f; } ...
classic closure problem. you need to use an anonymous function to induce scope, or break out all of your logic into its own function. Here's an article about Javascript closure: [How do JavaScript closures work?](https://stackoverflow.com/questions/111102/how-do-javascript-closures-work) KineticJS supports an unlimit...
161667
I want to generate a movie from an image sequence. I used this code: ``` %% 4.) GENERATE THE MOVIE disp("Generate the Movie..."); imageNames = dir(fullfile('images','*.png')); imageNames = {imageNames.name}'; outputVideo = VideoWriter(fullfile('images','AcousticCamera.mp4'),'MPEG-4'); outputVideo.FrameRate = 10; outpu...
The vector `overlaps` is never resized, so it has length zero, but you are writing to it anyway. This causes the program to crash immediately on my system. Another issue is that you forget to check the last sphere when printing the results. Also, there is the issue that after reading the last line, `leer1.eof()` is s...
162047
I have seen this effect on a few sites ( [CSS Wizardry](http://csswizardry.com/2012/02/pragmatic-practical-font-sizing-in-css/) - watch the logo/nav ) where an element stays in view while scrolling down the page (this is not the hard part) & then stops scrolling when it 'collides' (for want of a better word) with a spe...
Looks like csswizardry is using <http://csswizardry.com/wp-content/themes/new/js/jquery.scroll-lock.js> if you change ``` $(window).bind('load scroll', function(e) { if ($(window).scrollTop() + offsetTop >= lockPosition) { el.css({ position: "absolute", top: lockPosition }); } else ...
162208
I'd like, on "Release" button pressed, to trigger a server-side script of my own. I don't need to use big thing like Jenkins, I just need to run a simple script. I looked into the documentation and found "Listeners" on earlier versions, but there is nothing in the doc for latest version. Any idea?
Can you wrap your remote script in an HTTP interface and trigger it via a webhook? <https://developer.atlassian.com/jiradev/jira-apis/webhooks>
162241
I'm trying to get S3 hook in Apache Airflow using the Connection object. It looks like this: ``` class S3ConnectionHandler: def __init__(): # values are read from configuration class, which loads from env. variables self._s3 = Connection( conn_type="s3", conn_id=config.AWS_...
No other answers worked, I couldn't get around this. I ended up using `boto3` library directly, which also gave me more low-level flexibility that Airflow hooks lacked.
162386
OK. I am facing some difficulties in understanding the basics of concurrency. This question is about Deadlock. Please tell me why are both of these threads end in a deadlock. I took this example from [this](http://docs.oracle.com/javase/tutorial/essential/concurrency/deadlock.html) tutorial. And it says, *"When Deadl...
* Thread 1 calls `zarah.bow(khan)`: it acquires the intrinsic lock of the object referenced by `zarah` * Thread 2 calls `khan.bow(zarah)`: it acquires the intrinsic lock of the object referenced by `khan` * Thread 1 tries to call `khan.bowBack()`: it needs the intrinsic lock of khan to be able to do that. But this lock...
162711
I have this `JSON` output of a `SAP` function: ``` { "Z_HYD_GET_INVOICES": { "import": { "BRANCH": "0142", "DOCNUMS": null, "FINAL_DATE": "Tue Oct 08 00:00:00 BST 2019", "INITIAL_DATE": "Mon Oct 07 00:00:00 BST 2019" }, "export": { ...
Make sure that you close tab that were connected to pgAdmin before start the container.
163055
Is there such a thing as a day (festival or celebration) dedicated to a town or city in Great Britain or the USA? What would such an event be called? For instance, I live in Mtsensk, Russia. Each year on a certain date there's a celebration dedicated to Mtsensk, as there are for other towns and cities in Russia. Each ...
I think in context "Mtsensk Day" would be both clear and natural. It's not a concept I'm aware of in any English-speaking town, but we do have [Yorkshire Day](https://en.wikipedia.org/wiki/Yorkshire_Day) for the county.
163181
I have a vba code thats Auto\_Open. It does some checks then prompts a userform that asks for username and password. I called this userform with `userform_name.show`. My issue is how can I return a `Boolean` to my `Auto_Open` sub from the userform code. I linked the code that verifies if the credentials are correct t...
Remove `Dim bool As Boolean` from the userform code area and declare it in the module as shown below This is how your Code in the module would look like ``` Public bool As Boolean Sub Auto_Open() ' '~~> Rest of the code ' UserForm1.Show If bool = True Then '~~> Do Something Else ...
163488
Is it possible to run some Python command to not see so much ballast output in the console? I am talking now about running Scrapy where I see tons of not needed texts that disallow to see some meaningful output only. But I see some ballast in there also when running e.g. `pip install`. Not helpful at all. [![a sample...
Ok solved partly thanks to Steve Barnes and partly to my knowledge haha. I had set an environment variable `PYTHONVERBOSE=1` had to remove it and then it works as expected. Good.
163627
I have a Web application which will be deployed to Windows Azure and I'm looking for alternatives to generate Excel spreadsheets. Can I use VSTO to programatically generate an Excel spreadsheet in a Web Role running on Windows Azure?... If yes, how should I deploy the application to Windows Azure? What assemblies shou...
I tested this and apparently it won't work, VSTO requires Office to be installed.
163753
I have been working on RAD Studio and on that this is performed automatically if the background is fully transparent, but it seems that it isn't as simple to do in Visual Studio. I have read articles and questions of functions GetWindowLong() and SetWindowLong(), but when I try to use them myself, I get error "the name...
The methods you are using are not found in the standard .NET libraries, you need to invoke them through `user32.dll`. ``` [DllImport("user32.dll", EntryPoint = "GetWindowLong", CharSet = CharSet.Auto)] private static extern IntPtr GetWindowLong32(HandleRef hWnd, int nIndex); [DllImport("user32.dll", EntryPoint = "Get...
163898
hi I write a php file that contains two methods : **1)** ``` function restart(){ echo('restart') }; ``` **2)** ``` function shutdown(){echo ('shutdown')}; ``` then I include the **index.php** file to the **foo.php** and when I want to call index.php **methods** in an **eventHandler** in foo.php it doesn't work l...
The PHP code is being run when the file is 'rendered', so the function call to `restart`, even though it is within the JavaScript event listener, is being run on render. If you check the source (after fixing the missing semicolon), it should show `restart` in place of the PHP code. You cannot call PHP code within Java...
165052
I'm hosting a Minecraft server that gets updated from time to time. I'd like to make it easy for players to know which mods they will need to play without requiring me to communicate with them outside of Minecraft. This info would be good for new players, as well as regular players who need to be informed that a new mo...
Players can't join a server if they don't have all the correct mods installed (for Forge at least). I'd put a link in the MOTD, linking to a website like Pastebin, etc., and direct users there. Note that users cannot directly click links in the MOTD, so ideally it should be short.
165180
I'm porting / debugging a device driver (that is used by another kernel module) and facing a dead end because dma\_sync\_single\_for\_device() fails with an kernel oops. I have no clue what that function is supposed to do and googling does not really help, so I probably need to learn more about this stuff in total. T...
On-line: [Anatomy of the Linux slab allocator](http://www.ibm.com/developerworks/linux/library/l-linux-slab-allocator/) [Understanding the Linux Virtual Memory Manager](http://www.phptr.com/content/images/0131453483/downloads/gorman_book.pdf) [Linux Device Drivers, Third Edition](http://lwn.net/Kernel/LDD3/) [The L...
165575
I have a device ([NXQ1TXH5](https://eu.mouser.com/datasheet/2/302/NXQ1TXH5_SDS-1152191.pdf)) that I want to run at 5V. I am also interfacing this device with a Raspberry Pi4 for i2c communication. This raspberry pi 4 is going to be the master in my i2c network. This runs at 3v3. As the title says, I want to pull up SD...
The best option, when possible, especially in the case where there is a single I2C master, is to pull up to the same VCC as the I2C master. In your application that would be the Raspberry Pi VCC, I guess. But it is still an interesting question. The basic answer is, yes, you can use a divider for pullup. The effectiv...
165587
My sql script is like this : ``` SELECT hotel_code, star FROM hotel WHERE star REGEXP '^[A-Za-z0-9]+$' ``` The result is like this : <http://snag.gy/kQ7t6.jpg> I want the result of select the field that contains numbers and letters. So, the result is like this : ``` 3EST 2EST ``` Any solution to solve my prob...
I guess you're trying to get Must alphanumeric values. It can be achieved by following. ``` ^([0-9]+[A-Za-z]+[0-9]*)|([A-Za-z]+[0-9]+[A-Za-z]*)$ ```
165642
i'm using Netbeans 6.8 and build simple Maven web application project. create Entity and main file for persist Entity [also create persist unit] and use EclipsLink. but when i run main file get this error : ``` Exception in thread "main" java.lang.NoClassDefFoundError: javax/persistence/Persistence at Main.m...
Click [Here](http://repo1.maven.org/maven2/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.1.Final/hibernate-jpa-2.0-api-1.0.1.Final.jar) to download `hibernate-jpa-2.0-api-1.0.1.Final.jar` and put it into the project library, your application will work fine. Good luck:)
165885
i want by group by 'Facturacion' and Motor Facturación Drools. I have this sql: ``` SELECT c.cname AS componente, w.timeworked / 3600 AS horas, Sum(w.timeworked / 3600) OVER () AS sum_tipo, Sum(w.timeworked / 3600) OVER ( p...
First check that your cryptogen tool (the one you have setted in your path) is the one that you are using in your example, is very common to be pointing to an old version tool. I highly recommend if you are going to restart everything to clean all your containers running ``` ./byfn.sh -m down docker stop $(docker ps ...
165949
Trying to generate a random number and use it for variable value in Windows batch script file. Maybe I am missing something very basic, but something is not working here for me. Created a batch file named `random_test.bat` with the following content. ``` SET rnumber=%random% echo %random% pause ``` Running the file...
To provide a summary of everything that was learned from the comment discussion, external resources and testing regarding my original question. Random number generator in batch script uses the following algorithm to seed the initial random number value when a new CMD window is opened. (from here - <https://devblogs.mi...
166204
I've a strange issue. Let me explain in details below step by step: 1. I've a vendor developed REST WS (Made using WCF) for synchronizing data with MS CRM. 2. I've developed a windows service, which fetches batches of data to be synchronized from a database and then pass it to this web services using Post method as JS...
We need to understand how it works, there were quite a few conditions: 1. We were passing a datetime value in JSON. At the WS end the DateTime value was throwing some parsing errors when The WS container in our case (IIS and WCF) trying to pass the DateTime field to the application was failing in doing the conversion....
167620
I am new to python and using multiprocessing, I am starting one process and calling one shell script through this process. After terminating this process shell script keeps running in the background, how do I kill it, please help. python script(test.py) ====================== ``` #!/usr/bin/python import time import ...
The reason is that the child process that is spawned by the os.system call spawns a child process itself. As explained in the [multiprocessing docs](https://docs.python.org/2/library/multiprocessing.html#multiprocessing.Process.terminate) descendant processes of the process will not be terminated – they will simply bec...
168756
I am very new to Java. I have written a small program to understand Encapsulation and access method. The code is : ``` package practise; public class EncapTest { private String name; String surname; public String getName() { return name; } public void setName(String name) { this....
Your `surname` field has default (package-private) access level, it means that this field visible only for classes, which declared in same package. ``` String surname; // access level implicitly sets to package-private ``` There are four access levels in Java: * public * protected * package-private (no explicit mod...
168949
What is the problem with my for-loop? It is inside a helper function but the error "Member reference base type 'int [13]' is not a structure or union" is happening across my code. The 'int [13] changes to int[10] when I am using a 10 integer array, so I assume it is a problem there. Here are two examples: ``` ...
You can simple add a click listener to the button: ``` <template> <div id="app"> <button @click="redirectToHome()">Go Back</button> <button @click="redirectToFoo()">Click ME</button> </div> </template> ``` and implement them inside methods ``` <script> export default { name: "#app", methods: { ...
169014
Consider the following code: ``` Public Class Animal Public Overridable Function Speak() As String Return "Hello" End Function End Class Public Class Dog Inherits Animal Public Overrides Function Speak() As String Return "Ruff" End Function End Class Dim dog As New Dog Dim animal As Anima...
You don't; the subclass's method overrides the superclass's method, by definition of inheritance. If you want the overridden method to be available, expose it in the subclass, e.g. ``` Public Class Dog Inherits Animal Public Overrides Function Speak() As String Return "Ruff" End Function Publ...
169111
The problem: ============ I have several Rmarkdown documents representing different sections of my thesis (e.g. chapter 1 results, chapter 2 results), and I would like to combine the knitted latex versions of these documents with other TeX files into a master TeX 'thesis' document. The problem is, that when knitting t...
Here is a simpler solution using the LaTeX package `docmute`. Your main Rmarkdown document, (e.g., `main.Rmd`) should load the `docmute` package and include your other files (e.g., `part1.Rmd` and `part.Rmd`), once knitted and located in the same directory, with `\input` or `\include`like this: ``` --- title: "Main" ...
169607
I'm trying to save file directories so that when my app opens again the directories are remembered. I want to save the directories to a file called 'directories.txt' which is in my source code package. I did learn how to read from it by using: ``` getClass().getResourcesAsStream("/getresources/directories.txt") ``` ...
It's not possible. The file you are getting is a resource in the class path of your application, like a .class file. And like a class file it cannot be rewriten into its original place (being either a jar, zip or binaries .class folder). It's read only and cannot be used for persistence. To persist any data you are go...
169714
I am writing a bash script that reads a JSON string then loop based on the JSON values to execute a CLI command. ``` #!/usr/bin/env bash jq --version > /dev/null 2>&1 || { echo >&2 "jq is required but it's not installed. Aborting."; exit 1; } read -r -d '' USER_ACTIONS << EOM { "user1": [ "action1" ]...
Depending on what command you want to execute, if it can be performed from within jq, it's easier to also move the loop inside. There are several ways to accomplish that. Here are some examples, all yielding the same output: ```bash jq -r 'to_entries[] | "Executing command \(.key)-\(.value[])"' <<< "$USER_ACTIONS" ``...
169844
I am trying to determine which files will be touched based on their modified date. My directory is a top a list of perhaps several levels of subdirectories. From a terminal window I run this command: ``` find Program.8.koeb/ -mtime -10 ``` Which correctly produces a list of files modified within the past 10 days. H...
Just add '-type f' cause -exec ls -l {} will include those are directories and list them, too.
170020
I am writing a batch file that executes a Powershell script that at one point loops items with UNC paths as attributes and uses `Get-ChildItem` on those paths. In a minimal version, this is what is happening in my scripts: **Master.bat** ``` powershell -ExecutionPolicy ByPass -File "Slave.ps1" ``` **Slave.ps1** ``...
I have found this issue when running scripts referring to UNC paths - but the error only occurs when the root of the script is set to a non file system location. e.g. PS SQLSEVER\ So the following fails with the same error: ``` cd env: $foo = @{Name = "Foo"} $foo.Path = "\\remote-server\foothing" $bar = @{Name = "Ba...
170208
i need to disable or remove the Jsessionid in the URL how to do that, whether it causes any side effect during ajax request.I am using struts 1.2 version.
Servlet 3.0 allows you to specify the means of maintaining a session. I guess you are not using it, so see [this question](https://stackoverflow.com/questions/962729/is-it-possible-to-disable-jsessionid-in-tomcat-servlet). I favour the 2nd answer more than the rewrite.
170374
DX12 introduces a new feature of pipeline named 'Bundle'. It seems that can optimize the command list, and send it to final pipeline. Vulkan invent some different pipeline: The graphic pipeline and the compute pipeline. The graphic pipeline seems just the same with the original, the compute pipeline is used as an acces...
D3D12 has 4 separate kinds of command lists: direct, bundle, compute, and copy. Vulkan has similar concepts, but they happen in a different way. Command buffers are allocated from command pools. And command pools are directly associated with a queue family. And command buffers allocated from a pool can only be submitt...
171102
I have a problem with renderUI and I couldn't find a solution anywhere. Probably I'm asking the wrong question to google and more than a shiny problem is a basic R problem. I have a function in R which depending on the input will return a table or a text. So I created both the options in my server.R in this way: ```...
You have some issues here, the function will return different classes, including errors and warnings with interpretations. Here is a standalone example of what can happen with this function, you are encouraged to include the TryCatch in your code: **ui.R** ``` shinyUI( pageWithSidebar( headerPanel("drsmooth"...
172043
so i was working on a project you should know i have just started and was trying to make a login/logout of emails and some stuff and i saw this can someone help me find out what does this def serialize do here. ``` class Email(models.Model): user = models.ForeignKey("User", on_delete=models.CASCADE, related_name="emai...
This `serialize` method is just translating the model into other format for interoperability. In your case it's translating `Email` object into `dictionary` format. This method is not built-in it's custom method, you can use custom method based on your use case. Moreover, the name `serialize` is not also fixed, like ...
172971
I have two VMs (in VirtualBox), both of them are Ubuntu Server 18.10 (cosmic): * the first one, `Server`, has two NICs: one in NAT, the other one in intnet * the second machine, `Client`, has only one NIC, in intnet, to communicate with `Server` Now I would like to make `Server` a gateway, and so I've enabled IP forw...
UFW being inactive has nothing to do with it. In `iptables` parlance, you *must* have a `MASQUERADE` rule set in the NAT table for traffic to work being forwarded outbound regardless. Otherwise, the system won't know what to do with the packets. This remains the case even if you directly use `iptables` to manipulate t...
173000
I would like to move #wctopdropcont elements slightly to the left. I have tried applying values for margin and padding however it simply doesn't work. I would ideally want the text to be 20px to the left. The URL to my blog is as follows: <http://www.blankesque.com> and below I have included the entire hovering navigat...
In your `#wctopdropnav ul` selector, you have `margin: 0` so if you want to override that and add `margin-right: 20px;` then it must be declared after it like so. ``` #wctopdropnav ul { float: right; margin: 0; margin-right: 20px; } ```
173039
I am just a beginner with angularJs , and i am trying to do CRUD Operations using $http and asp.net MVC :- 1. I am using ng-repeat to display list of "Terms" . 2. I have a button to display a dialog ,which in turn will be used to inserting new "Term". 3. ng-repeat works well and the dialog also displayed and i can ins...
at the first glance , I guessed that the problem is the Scope , so I worked around it , I attached a CSS class to the table element which contains ng-repeat directive , this is my working code : ``` $scope.add = function () { $scope.opts = { backdrop: true, keyboard: true, backdropClick: true, templateUrl: '/Home/...
173537
I have custom UITableViewCell class which implements custom drawn design (as you can see, the cell has shadow effect.) As you can see below I'm trying to paint 1st cell with white color, any other cell must be gray. ``` - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGColorRef w...
OK, so the answer seem to be no! which surprised me some... Anyway. I made my own helper class which maybe can help you to. This is only one of many possible solutions. For my application it works nice to return null if nothing is found, maybe you want an exception instead. Also keep in mind that I am making this as ...
174083
I use `defined runtime attributes` in button. ``` layer.cornerRadius layer.masksToBounds layer.borderWidth ``` And I want to paint my border in green colour. But my code doesn’t work: ``` layer.borderUIColor ``` Borders have black colour. How to paint border in colour with runtime attributes? [![enter image desc...
Actually, you are using wrong attribute.The, correct attribute is `layer.borderColor`. But again it will not work because it is type of CGColor and from IB we can only assign UIColor, we can't assign CGColor. Eihter you can simply do it programaticlly. Or You can create extension with type CGColor.
174551
I cannot connect to a MySQL database, I am using xampp. It says this error from the code simple error: "Connection to the server failed!" ``` namespace Mysql { public partial class Form1 : Form { private MySqlConnection conn; private string server; private string database; priv...
OK, so I got it working. I fixed it adding SslMode=none.
174684
I'm new to Java and to Spring. How can I map my app root `http://localhost:8080/` to a static `index.html`? If I navigate to `http://localhost:8080/index.html` its works fine. My app structure is : ![dirs](https://i.stack.imgur.com/bMEaw.png) My `config\WebConfig.java` looks like this: ``` @Configuration @EnableWeb...
if it is a Spring boot App. Spring Boot automatically detects index.html in public/static/webapp folder. If you have written any controller `@Requestmapping("/")` it will override the default feature and it will not show the `index.html` unless you type `localhost:8080/index.html`
174827
I am using the BigCommerce PHP API and am receiving this error when it attempts to connect to either my store or the webdav store: *failed setting cipher list* From the same server I have connected to both sites using cURL via the command line. I have the cURL php module installed with SSL enabled. Any thoughts would...
Assuming this is a new installation and not a re-installation I think solving your problem is as simple as: ``` initdb `brew --prefix`/var/postgres/data -E utf8 ``` Typically the data directory is called "data' and is underneath the postgresql home directory. this allows for the possibility of sharing log file acces...
175142
I am confused by the behavior of `is.na()` in a for loop in R. I am trying to make a function that will create a sequence of numbers, do something to a matrix, summarize the resulting matrix based on the sequence of numbers, then modify the sequence of numbers based on the summary and repeat. I made a simple version o...
Your `break`s are breaking out of the `switch ... case` not the `while`. You'll need to use some kind of boolean flag to break out of the outer loop, e.g.: ``` bool someflag = true; while(someflag){ switch(something){ case a: someflag = false; // set the flag so we break out of the loop bre...
175173
After doing a standard, App Store upgrade of Yosemite it seems that the recovery partition is still Mavericks-specific. Whether I hold Cmd+R or Option and select the recovery partition it takes me to the Mavericks recovery. If I choose Reinstall OS X it kicks off the Mavericks (re)install screens. Shouldn't there be a...
I had the same issue since the beta and the official release did not solve this issue. In the terminal I had the following output: > > diskutil list > > > ``` /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *251.0 GB...
175259
I am sending an AJAX request having the "data" property being a FormData with a single key something like this: ``` var fData = new FormData($(accRegForm)); fData.append("Name", "Test Test"); $.ajax({ type: "POST", data: JSON.stringify(fData), url: "/DataService.ashx", contentType: "application/json; ...
After nearly 3 hours of experimenting I got it and even 260 times faster as before: ``` SELECT MAX(pd.id) AS max_id, pd.name AS player, MAX( pd.update_time ) AS last_seen, MIN( pd.login_time ) AS first_seen, SUM( pd.play_time ) AS ontime_total, SUM( CASE WHEN pd.login_time > NOW( ) - INTERVAL 1 DAY THEN pd.pl...
175599
I am importing via RSS various news articles from various sources (all beyond my coding/formatting control) into my client's database (all legal!) and I am attempting to standardize some of their styling for presentation on client's site via jQuery. For example... Many many sites use various header tags seemingly for ...
Try this: ``` var els = $('p').filter(function() { return /^<(b)>.+<\/\1>$/.test($.trim($(this).html())); }); ``` It will get you all `p` that have an only children `b` without any text nodes. You can change `(b)` with whatever tag in the code above. **Edit:** Don't know why the downvote but this works just fin...
175605
**Yes. I know they really only owned them for a day at this point in the movie.** > > TROOPER > How long have you had these droids? > > > LUKE > About three or four seasons. > > > BEN > They're for sale if you want them. > > > Is Luke referring to a farming season or planetary season? How long are these se...
Based on Luke's conversation with Lars about him leaving, I think it's planetary seasons, with a yearly harvest: > > **LUKE**: I think those new droids are going to work out fine. In fact, I, uh, was also thinking about our agreement about my staying on another season. And if these new droids do work out, I want to t...
176293
I have created a new content element, but I have a problem with the image field. I have managed to save it in db. There it is saved as a integer. In the fluid it comes back as a integer but I need the image object to display it. I know it must be a typoscript configuration problem but can't seem to solve it. **tt\_con...
A message queue seems like a good fit. When using a Azure Storage Queue you indeed need poll for new message. However, Azure Service Bus Queues push messages as stated by [the docs](https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-azure-and-service-bus-queues-compared-contrasted#consider-using-...
176508
I have a shell script called `setup_wsl.sh` which contains: ``` #!/bin/bash echo "hai" sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sud...
This is because of the carriage return in windows. Switch to the LF carriage with a text editor and save the new one to run the script or sed -i -e 's/\r$//' setup\_wsl.sh
176603
I need to arrange a table by performing some formatting, with a table like ``` DT <- read.table(text = "Year ST_ID N Overall Metric1 Metric2 1999 205 386 96.3 0 0 1999 205 15 0 0 0 1999 205 0 0 0 0 1999 205 0 0...
You can achieve this by adding a class when the div was clicked first. ``` $(document).ready(function () { $(".block-in-div").click(function () { return function () { cancelBg(); if(!$(this).hasClass('not-resized')) { $(this).css("background", getRandomColo...
176816
I am trying to read a single file from a `java.util.zip.ZipInputStream`, and copy it into a `java.io.ByteArrayOutputStream` (so that I can then create a `java.io.ByteArrayInputStream` and hand that to a 3rd party library that will end up closing the stream, and I don't want my `ZipInputStream` getting closed). I'm pro...
Your loop looks valid - what does the following code (just on it's own) return? ``` zipStream.read(tempBuffer) ``` if it's returning -1, then the zipStream is closed before you get it, and all bets are off. It's time to use your debugger and make sure what's being passed to you is actually valid. When you call getN...
176821
Is there a way to filter a list by User or Group column? I need to get all the tasks assigned to each user in a site. I got the below code for now, but that only works if I'm trying to get my tasks. Is there a way to pass an user ID to Membership Type so I can get the tasks of any user? ``` <Where> <Or> <Eq> <Field...
I don’t think this issue has ever been fixed. It also happens when we use an Excel Web Part on a page. The only workaround in the mentioned [document](https://support.microsoft.com/en-us/office/refreshing-data-in-a-workbook-in-a-browser-window-89560193-0c11-420b-b7d8-744766ccdc94) is to use Excel client application (i...
176969
I am using elastic beanstalk to deploy my laravel application. Everything is working fine except for my images as I need to create a symbolic link with storage to access it publicly. *P.S. Works fine on my local* **My .ebextensions file is as follows -** ``` commands: composer_update: command: export COMPOS...
Putting down an **alternate option** which does the job for people who are/might have a similar issue - **Use S3 for file storage in your Laravel application.** To make it happen - 1. Create a public S3 bucket. 2. Create an IAM user which has full access to S3 bucket. *(With the access key, the application will ha...
177195
I am writing a simple project using maven, scala and junit. One problem I found is that my tests cannot find org.junit.framework.Test. The test file: ``` import org.junit.framework.Test class AppTest { @Test def testOK() = assertTrue(true) @Test def testKO() = assertTrue(false) } ``` returns error: ``` ...
As @nico\_ekito says, your import is incorrect, and should be `org.junit.Test`. But this doesn't explain your problem: ``` [WARNING]..... error: object junit is not a member of package org [WARNING] import org.junit.framework.Test [WARNING] ^ ``` So it can't find org.junit. This means that org.junit i...
178131
In Xcode 3.2.5 I use "Build And Archive" to create an IPA file without any problems. How can I do that in Xcode 4? I think I have to use "Product -> Archive", but I get over 100 error messages in the three20 framework. Most are "No such file or directory". ("Product -> Build For -> Build For Archiving" works. No errors...
I had to go under Project Info > Build (tab) and add the following to the header search path: ``` three20/Build/Products/three20 ``` This path may be specific to my project, but there it is in case it works for someone else.
178417
I am confused by the Bundle/Gem approach of global dependencies. I thought global dependencies are a thing of a past. I present to you two approaches of handling dependencies, NPM vs Bundle/Gem. ### NPM Let me demonstrate the power of NPM. Say you have an app with the following folder structure: ``` /app /admin ...
I found the 'answer'. Ruby unlike Node.js does not have a built in support for local node\_modules like implementation. Thus you have to use Bundler. But to use the dependencies in your code you need to let Ruby know where these dependencies are located. Bundler makes it easy for you with the following lines in your ...
178496
I know how to replace an Apostrophe from a String with a space, in php. However how can I remove Apostrophes in arrays items? ``` //Example replacing Apostrophe with space $string = str_replace("'", "", $escapestring); if ( $f_pointer === false ) die ("invalid URL"); $ar=fgetcsv($f_pointer); while(! feo...
I believe that you can compare a modulo of the time difference in months to match the months and dates regardless the year. You would just need to handle the date for the first and last months in the acceptable range. I've done this below, but since I don't have SQL Server installed, I can't test how DATEDIFF works wit...
178610
I'm trying to make a user control in wxWidgets to represent a channel in an audio mixer. So, each channel has a standard set of controls inside itself (some sliders, buttons, etc..). So inside my class I have a sizer in which I add the various child controls I need. So far that works. But the problems I have are * i...
I haven't been playing with grappelli but in standard django-admin I would consider usage of: ModelAdmin.raw\_id\_fields. The limitation is that you don't select services using name but using pk. > > By default, Django's admin uses a > select-box interface () for > fields that are ForeignKey. Sometimes > you don't...
178731
I have created a stored procedure of insert command for employee details in SQL Server 2005 in which one of the parameters is an image for which I have used `varbinary` as the datatype in the table.. But when I am adding that parameter in the stored procedure I am getting the following error- > > *Implicit conversi...
You assign a string to a varbinary as default value. This operation don't perform a implicit cast. To avoid error: Change line: ``` @Photo varbinary(50)='' ``` by: ``` @Photo varbinary(50) ``` If you don't have Photo value for some rows you should alter table column to **allow nulls**.
178766
I'm trying to use an `INNER JOIN` in SQL to show a column from one table into another. Here is the query that I'm using: ``` SELECT * FROM Person.BusinessEntity INNER JOIN HumanResources.Employee ON Person.BusinessEntity.BusinessEntityID = HumanResources.Employee.JobTitle ``` When I execute this, I get an error: ...
As you are trying to join to columns with different data types you are forcing the database to make an implicit conversion which it can't do in this case. What you want to do is to join the tables on the keys the share (which would be BusinessEntityID in this case). The table and column names look familiar and I'm gue...
179331
I have CKEditor & i save that as a Html in my database.Then i'm going to get that saved html stream & show it inside div But it shows the html codes. My webmethod return below line ``` <p> <strong>Test Heading </strong></p> <p> <img alt="" src="http://s7.postimg.org/511xwse93/mazda_familia_photo_large.jpg" style="wid...
You need to decode your html content before you can use it as html. ``` success: function (Result) { $.each(Result.d, function (key, value) { var html = $("<div/>") // temp container .html(value.News) // "render" encoded content to text .text(); // r...
179425
I am using the package titlesec to format the titles in my document. As I don't want to have the titles in a closed box (we could use "frame" as format parameter of \titleformat for that), I use a \colorbox between two \titlerule: ``` \usepackage[explicit]{titlesec} \titleformat{name=\section}[block] {\titlerule\no...
It seems that you looking for one from the following examples: ``` \documentclass[11pt]{article} \usepackage[margin=3cm]{geometry} \usepackage{tabularx} %---------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.15pt} \renewcommand*\ShowFrameColor{\c...
179831
A professor asked me to help making a specification for a college project. By the time the students should know the basics of programming. The professor is a mathematician and has little experience in other programming languages, so it should really be in MATLAB. I would like some projects ideas. The project should ...
MATLAB started life as a MATrix LAB, so maybe concentrating on problems in linear algebra would be a natural fit. Discrete math problems using matricies include: 1. Spanning trees and shortest paths 2. The marriage problem (bipartite graphs) 3. Matching algorithms 4. Maximal flow in a network 5. The transportation ...
180659
Check was sent for $2800? What are the steps to obtain additional $1400 for child? I was perusing below to no avail: [IRS 3rd payment here](https://www.irs.gov/coronavirus/third-economic-impact-payment)
> > If it is how come there are stuff called land loans? > > > Since mortgages on home are much more common, it's typically inferred that a "mortgage" means a loan on a house (or possibly on a multi-family structure or other type of building). The reason that "land loans" are specified may be because the *conditio...
181106
I used this query to load data to mysql table. `LOAD DATA INFILE 'E:\upload.csv' REPLACE INTO TABLE ms.no_vas LINES TERMINATED BY '\n';` **Upload.csv** `123` `456` `789` `000` `111` `222` `333` Now i have another csv file `delete.csv` which contents i want to delete from the `ms.no_vas`tabl...
Upload the delete.csv into a temporary database, then delete using a subquery. Example: ``` DELETE FROM ms.no_vas WHERE ms.no_vas.value IN (SELECT value FROM temp_delete_table); ```
181220
I have several websites running in Azure, intensively using ServiceBus (also hosted in Azure), all in one region. Sometimes (once every 2-3 days) I have same error in all web sites at the same time (during reading/waiting for messages): ``` Microsoft.ServiceBus.Messaging.MessagingCommunicationException: The X.509 c...
A change in Connectivity Mode *could* solve your problem. ``` ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Https ``` It is normally `ConnectivityMode.AutoDetect` According to a source in MS support > > "This will force all traffic to use a WebSockets tunnel that is > protected by a *prior* T...
181326
I think the question is clear from the heading. I have a PHP file, call it PHP1. In that PHP1, I have a URL looking pretty much like `www.mywebsite/script.php?color=red&sky=blue&past=gone` Where I am confused is that the values 'red' and 'blue' and 'gone' are in three dynamic variables: `$var1`, `$var2` and `$var3`....
I think you are looking for how to generate dynamic url in your php1 file ``` $c = "red"; $s = "blue"; $stat ="past"; //Now you need to generate a dynamic url in your php1 file $url = 'www.mywebsite/script.php?color='.$c.'&sky='.$s.'&past='.$stat; //now genearte a dynamic link echo '<a href="'. $url.'">Click me</a...
182447
Currently, my app allows the user to click on a "default avatar pic" and then select from a group of images. This image is then returned to the first activity via "startActivityForResult". My next task is to take the image that is now set in the first activity and send it to a third activity when the user presses the "...
You can just simply use the ImageView Id as a integer or string value, then pass it. No need to use any bitmap. Bitmap takes too much memory. Image should be work as a resource id if the image is selected from your resource folder. If your image comes from cloud, then definitely have a url as a string. So handle it as ...
182716
I was reading a chapter on effective Java that talks about the advantages of keeping only one instance of an immutable object, such that we can do object identity comparison `x == y` instead of comparing the values for identity. Also, POJOs like [`java.awt.RenderingHints.Key`](http://docs.oracle.com/javase/1.4.2/docs/...
That is sometimes called the Flyweight pattern, especially if the space of possible objects is bounded.
183090
**Output to be produced** ![enter image description here](https://i.stack.imgur.com/XMvsv.jpg) using this as reference but now with different scenario [SQL Server query : get the sum conditionally](https://stackoverflow.com/questions/29597690/sql-server-query-get-the-sum-conditionally) **explanation:** Item, Sales,...
Try **Left Join** clause instead of Cross Apply: ``` SELECT a.item, a.sales, a.remarks, CASE WHEN a.remarks = 'n/a' THEN a.sales ELSE SUM( b.sales ) END AS [New Sales] FROM query_using_cross_apply_to_get_sum_conditionally a LEFT JOIN query_using_cross_apply...
183422
I know how to compare lists but working with unflatten data in Pandas is beyond my skills..anyway.. I have: ``` list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ``` and ``` df = pd.DataFrame({ "col1":["a", "b", "c", "d"], "col2":[[1, 2, 3, 4, 5], [20, 30, 100], [1, 3, 20], [20,30]] }) ``` I want to compare the `list` with...
Alternative #2: **Use the + operator for `object-node`** ```xquery let $extra := if (fn:exists($extraAttribute)) then object-node { "extra": $extraAttribute } else object-node {} let $data := object-node { "query": array-node { $id } } + $extra ``` I could not inline the `$extra` withou...
183504
I am currently learning C++ and I am having an odd issue with threads. I've done lots of threaded stuff in Java and C# and not had an issue. I am currently trying to replicate a C# library that I have in C++ with a library and a test app. In main.cpp I create an instance of a `InitialiseLibrary` class and call the me...
Your main thread blocks at this line, waiting for the logRotationThread to end. ``` logRotationThread.join(); ``` Your main thread should go and do whatever work it needs to do after spawning the other thread, then only when it has nothing left to do should it `join()` the log rotate thread.
183653
I have a Excel sheet, which includes many groups and subgroups. Each subgroup has their own subtotal. And as long as I can't know how many lines users will require for the subgroups, I only left 3 rows blank for each subgroup and created a button which triggers Automatically Copy and Insert Copied Row macro. Now I nee...
You can try something like: ``` file = open('traintag1.csv','r') csv_reader = csv.reader(file) data, target = zip(*[(x[-1], x[-2]) for x in csv_reader]) print len(data) print len(target) ``` This code creates a list of tuples, and then uses zip to expand the pairs into independent lists.
183969
I have a WCF service that is setup to be hosted within a unity container. I was intending to use this container to perform method interception. The problem is I cannot get my interceptor to fire... First here the definition of my interceptor attribute and handler: ``` [AttributeUsage(AttributeTargets.Method)] public ...
You might want to check out using WCF behaviors. Here's links that might be useful. <http://msdn.microsoft.com/en-us/magazine/cc136759.aspx> AND <http://www.global-webnet.net/blogengine/post/2009/01/03/Integrating-IIS-WCF-and-Unity.aspx> -Bryan
184108
I am writing a sql query in Laravel to fetch all the data for current year but condition is I want to get status - Pending data first and Approved and Rejected data. According to 'status' = Pending/Approve and Reject? ``` $leaves = Leave::whereRaw('YEAR(start_date) = YEAR(CURDATE()) AND YEAR(end_date)=YEAR(CURDATE())'...
Check if `READ_CALL_LOG` permission is there in your `app.json`, if no then add it like below ``` { "expo": { .... .... "android":{ "permissions":["READ_CALL_LOG"], "package":"your package name here" } } } ``` Ref : [Permissions](https://docs.expo.dev/versions/latest/config/app/#permi...
184612
I followed the instructions at <https://create-react-app.dev/docs/deployment/#github-pages> and noticed that the command `gh-pages -b master -d build` replaced the contents of my working directory with the contents of the `build` folder and committed these changes to the `master` branch. This works as advertised to pub...
Your logic is a bit backwards; you're doing: > > Every frame, scan for close Colliders and if the Player clicks E, do something for each of them > > > but should be doing: > > Every frame, check if Player clicks E and if someone is close, do something > > > Given the code supplied, it could probably be refa...
184653
referring to this question: [Finding duplicate values in multiple colums in a SQL table and count](https://stackoverflow.com/questions/70512433/finding-duplicate-values-in-multiple-colums-in-a-sql-table-and-count) I have the following table structure: ``` id name1 name2 name3 ... 1 Hans Peter Frank 2 Hans Frank...
First normalize the table with `UNION ALL` in a CTE to get each of the 3 names in a separate row. Then with `ROW_NUMBER()` window function you can rank alphabetically the 3 names so that you can group by them: ``` WITH cte(id, name) AS ( SELECT id, name1 FROM tablename UNION ALL SELECT id, name2 FROM tablenam...
184740
I have created an azure function that gets triggered when a new document is added to a collection. ``` public static void Run(IReadOnlyList<Document> input, ILogger log) { if (input != null && input.Count > 0) { log.LogInformation("Documents modified " + input.Count); log.LogInformation("First document Id " + ...
If I understand correctly, you want to query documents on a second collection based on the changes that happen on a first collection? That is certainly doable, you need to use a [Cosmos DB Input Binding and pull the `DocumentClient` instance](https://learn.microsoft.com/azure/azure-functions/functions-bindings-cosmosd...
184805
**UPDATE:** When installing both packages using setup.py alone they install just fine. When extracting the tarballs generated by sdist and installing them the same error occurs. This means that the problem is somewhere inside setuptools I guess. I developed two projects that have two namespace packages: testsuite and ...
After installing one of your packages and downloading the other… You're not including `testsuite/__init__.py` and `testsuite/prettyprint/__init__.py` in the source files. The docs on [Namespace Packages](http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages) the `setuptools`/`pkg_resources` way explai...
185495
I have 2 models (`User` & `UsersDetails`) in relation with Eloquent Laravel. **Model "User" Realation With 'SelDetails'** ```php public function SelDetails { return $this->belongsTo('App\UsersDetails', 'users_id'); } ``` **I want to get only two column 'created\_by\_id', 'created\_by\_name' from SelDetails** U...
guys thanks for your precious response on this issue. i got the solution via following way. **changes in "User" model Relation With 'SelDetails'** ``` public function SelDetails { #return $this->belongsTo('App\UsersDetails', 'users_id');// the old one return $this->hasOne('App\UsersDetails', 'users_id'); } `...
186074
Inside `c:\test\` I have: * .\dir1 * .\dir2 * .\dir3 and * file1.txt * file2.txt * file3.txt * file4.txt I want to compress only `dir1`, `dir2`, `file1.txt` and `file2.txt` I use the following script to compress selected folders ``` $YourDirToCompress="C:\test\" $ZipFileResult=".\result.zip" $DirToInclude=@("dir...
Try something like this: ``` Get-ChildItem -Path $YourDirToCompress | Where {$_.Name -in $DirToInclude} | Compress-Archive -DestinationPath $ZipfFileResult -Update ``` `Compress-Archrive` is capable of zipping both files and directories. So in this code we are using `Get-ChildItem` without the `-Directory` flag whic...
187010
I'm writing a custom xml deserializer for an iphone app. As you can see below, I'm looping through all the list elements in the xml, I have debugged it, and with each loop there is a new and different element. The problem is that the xpath helper methods (there are similar ones to the one posted below, but for int and ...
It looks OK for me. Although the releases inside the getString:fromXPath: aren't necessary (you don't need to release parameters entered into a method or objects obtained from a NSArray. The proper way to release an object from a NSArray is removing it from the array, as for objects passed as a parameter, if you want t...
187293
I am working with ARM mali 72 on my Android smartphonne. I would like to use the output buffer fron OpenCL to render it into OpenGL like a texture. I have no problem with openCL alone nether openGL alone. I got no cloud to how to use both in the same application. The goal is to use mY output OpenCL and send it to o...
You could do it with a recursive template like this : ``` <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" > <xsl:output method="text"/> <xsl:strip-space elements="*"/> <xsl:variable na...
187608
I have code for a tabular environment that is not displayed properly. I have the right parenthesis following the lower-case Roman numerals `i`, `iii`, and `v` aligned, and I would like to have the right parenthesis following the lower-case Roman numerals `ii`, `iv`, and `vi` aligned. I thought that I had made the inter...
Something like this? [![enter image description here](https://i.stack.imgur.com/Pq5rv.png)](https://i.stack.imgur.com/Pq5rv.png) ``` \documentclass{amsart} \usepackage{array} \newcolumntype{L}{>{$\displaystyle}l<$} \newcommand\mmid{\;\middle\vert\;} \begin{document} \noindent The following sets have either a least ...