2018-10-22         Zenobia

Configuring NSPredicateEditor(RowTemplate) for Spotlight metadata queriesI'

I'm trying to configure an NSPredicateEditor (in Interface Builder) to edit the predicate for an NSMetadataQuery. As a first step, I'm trying to configure an NSPredicateEditorRowTemplate to accept key path(s) for the left-side expression, trying a single keyPath (kMDItemTextContent) to get started.I can't figure out how to get all the pieces into IB. I've selected the row template, and set "Left Exprs" to "Key Paths" in the IB Attributes Inspector. But, using Apple's PhotoSearch example as a model, it appears that I should enter a user-readable attribute name (say, "Content...

 cocoa                     1 answers                     83 view
 2018-10-22         Zenobia

MSYS2 keeps resetting settings

I just have a basic question. MSYS2 keeps resetting my settings when I restart it.For example, when I set the language from German to ENglish (export LANG=...), it will reset after restarting. Only changing windows language works.After installing a new program, apparentely this program folder is the new home folder now (?). When I try to change the home directory, it get reset again after restart.I hope you can help me. Thanks a lot !EDIT: Alright, so this new software I installed changed my HOME environment variable. I fixed this now.Kind Regards,RM You can solve this i...

 msys2                     1 answers                     100 view
 2018-10-22         Zenobia

Authorization settings for a folder in ASP.NET

I have an asp.net web site, I want restrict all users to access a folder named "log" and I have this element in web.config:<location path="log"> <system.web> <authorization> <deny users="*"/> </authorization> </system.web></location>and this element before it in system.web:<authorization> <allow users="*"/></authorization>but still I have access to this url: http://www.mydomain.com/log/log.txtAny ideas?Thanks. .txt files are not handled by ASP.NET by default. You'll have to bloc...

 asp.net                     3 answers                     64 view
 2018-10-22         Zenobia

Setting up AWS IoT using Serverless Framework for Multiple IoT Devices

My goal is to create a system on AWS using the serverless framework for multiple IoT devices to send JSON payloads to AWS IoT, which in turn will be saved to DynamoDB.I am very new to using AWS outside of creating EC2 servers and this is my first project using the serverless framework. After referring to an example, the modified version that I came up with is posted below.Problem: It appears that the example is for just 1 device to connect to AWS IoT, which I concluded from the hardcoded IoT Thing certificate being used, such asSensorPolicyPrincipalAttachmentCert: Type: AW...

 amazon-cloudformation                     1 answers                     27 view
 2018-10-22         Zenobia

python3: convert list of lists to dictionary of lists

I am facing a problem with one of my python script when trying to convert a list of lists to a dictionary of lists.Here is what I have: a list of lists of ID numbers.a = [ [0,1,2,5] , [4,5] , [0,4] , [2,5] ]And I need to convert it in a dictionary of lists, in which keys correspond to each ID number and values are the list of ID numbers found with the key in the previous list of lists.That would be:b = { 0 : [1,2,5,4] , 1 : [0,2,5] , 2 : [0,1,5] , 4 : [0,5] , 5 : [0,1,2,4] }My original list of lists (a) is composed of 70,000 lists, and each of them consists on 2 to 5000 ID ...

 python-3.x                     2 answers                     7 view
 2018-10-22         Zenobia

Want to disable signals in Django testing

So I have various signals and handlers which are sent across apps. However, when I perform tests / go into 'testing mode', I want these handlers to be disabled.Is there a Django-specific way of disabling signals/handlers when in testing mode? I can think of a very simple way (of including the handlers within an if TESTING clause) but I was wondering if there was a better way built into Django?... No, there is not. You can easily make a conditional connection though:import sysif not 'test' in sys.argv: signal.connect(listener, sender=FooModel) [XXX]I found this ques...

 django                     4 answers                     88 view
 2018-10-22         Zenobia

CMake on MSYS2 freezes up

I'm running MSYS2 on Windows 8, and having problems with CMake freezing / locking up.Here's a minimal example:main.cpp:#include <iostream>int main(){ std::cout << "Hello World!" << std::endl; return 0;}CMakeLists.txt:cmake_minimum_required(VERSION 3.0.0)project (helloworld)add_executable(helloworld main.cpp)If I open the MSYS2 console, go to the directory in which both of the above files are located, and execute the commandcmake .there is no further output and the console locks up. An empty CMakeFiles folder is created, but nothing else happens. I'v...

 c++                     1 answers                     45 view
 2018-10-22         Zenobia

I am trying to get a simple jqplot example going but it will not display, why not?

Here is the entire contents of the file:<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>jqPlot Examples</title> <!--[if IE]><script language="javascript" type="text/javascript" src="excanvas.js"></script><![endif]--> <script language="javascript" type="text/javascript" src="../jqtouch-1_0_b/jqtouch/jquery.1.3.2.min.js"></script> <script language="javascript" type="text/javascript" src="../javascript/jquery.jqplot.min.js"></script> <link...

 javascript                     3 answers                     76 view
 2018-10-22         Zenobia


I'm about to lose it with this stupid mysql statement. Can anyone please tell me what it wrong with this statement please?SELECT * FROM contacts INNER JOIN ind_categories ON contacts.vendor_id = ind_categories.vendor_id AND ind_categories.category_id = "retail" AND WHERE zipcode in ( " 93044,93041,93043 " ) Try:SELECT * FROM contacts INNER JOIN ind_categories ON contacts.vendor_id = ind_categories.vendor_id AND ind_categories.category_id = 'retail' WHERE zipcode in ('93044','93041','93043')You should not have an AND before your WHERE, each set element in the IN clause ne...

 sql                     3 answers                     70 view
 2018-10-22         Zenobia

Oracle database is hanging infinitly in UPDATE queries

suddenly my update queries are not executing . i can make select queries but when i try to update records the database hangs infinitly. i tried even from sql plus and nothing happens. Most likely you have another open uncommitted transaction for the same set of records, so they are locked for that transaction. And, most likely, you locked them, running the same UPDATE in another transaction. Just Commit/rollback your transactions, you should be fine. [XXX]This query will show you who is blocking your update. Execute the update that hangs, then in another session ru...

 sql                     2 answers                     35 view
 2018-10-22         Zenobia

Hibernate - get the wrong entities from my example tables. It looks like table columns are "exchanged"

I have in my sql server 2016 database three tables as example for an Hibernate application which uses a join table with an additional column to assign articles buyed from an customer with a specific amount. My tables in the DB are:table_article (a_id int, description varchar(255))a_id description 1 fish 2 fish 3 watertable_customer (customer_id int, name varchar(255)customer_id name 1 john 2 jane 3 jack ac_join_table (a_id, customer_id, amount, pk(a_id, customer_id))a_id customer_id amount 1 2 ...

 java                     1 answers                     49 view
 2018-10-22         Zenobia

Kafka integration with RDBMS

Can someone help me with the steps to integrate Kafka with RDBMS, I have to stream data from a table into spark mllib. Any solution other than Kafka will also help. if you are trying to read data from one source and save it into any data base. You can achieve this using kafka-producer and kafka-consumer. to learn more about kafka visit [XXX]

 apache-kafka                     1 answers                     22 view
 2018-10-22         Zenobia

Error trying to use a4j:mediaOutput on JBoss EAP 6.4

I'm trying to render a picture in my application. I have choosen a4j:mediaOutput to render that. I use the example from the jboss doc link and it shows the error: 11:49:53,716 SEVERE [org.richfaces.log.Resource] (http-localhost/ Input error for deserialize data : java.io.InvalidClassException: Unauthorized deserialization attempt; simple.MediaData at org.richfaces.util.LookAheadObjectInputStream.resolveClass(LookAheadObjectInputStream.java:100) [richfaces-core-4.5.17.Final.jar:4.5.17.Final] at java.io.ObjectInputStream.readNonProxyDesc(ObjectIn...

 jsf                     2 answers                     16 view
 2018-10-22         Zenobia

How to create a folder out of the first few letters of a filename?

So I checked out the basic things but I'd like to do the following:I have 5 files let's say: X1_word_date.pdf, XX1_word_date.pdf, etc...I'd like to create a folder structure like: C:\PATH\X1, C:\PATH\XX1, etc...So how do I take the first letters before the '_' in the file names and put it into a string?My idea is that I use the Directory.CreateDirectory and than combine the main path and the strings so I get the folders.How do I do that? Help appreciated. string fileName = "X1_word_date.pdf";string[] tokens = fileName.Split('_');string myPath = "C:\\PATH\\";Directory.Cre...

 c#                     5 answers                     13 view
 2018-10-22         Zenobia

What is the importance of CoreCLR, PCL and WinRT in Azure-Storage-Net change log

I was inspecting the change log of Windows Azure Storage nuget from here. I do not get the usage of CoreCLR, PCL and WinRT. For instance Changes in 7.2.0 : All (CoreCLR): NetStandard target framework changed to netstandard1.3 All (PCL): Removed support for PCL in favor of NetStandard GA release ... Changes in 7.1.2 : ... All (WinRT): Fixed a bug where HttpClient default timeout caused unhandled TaskCancellation exceptions. ... A simple search on google tells that CoreCLR is a .NET execution engine and WinRT stands for Windows Runtime. I do not know what...

 azure                     1 answers                     56 view
 2018-10-22         Zenobia

Click on <a> text to checked input

How can I make sure that when I click on the text in <a> the checkbox is activated? Now when someone click on the text of the checkbox the drop down menu closes.This is a simple snippet:<div id="divChooseMacro" class="dropdown-menu" aria labelledby="choose-macro"> <a class='dropdown-item' data-value='pippo' style='cursor: pointer;'> <input type='checkbox' value='pippo'/>&nbsp; pippo </a></div>I try to set a cursor: pointer in the tag <a> but without success I suggest you to use label tag to relate it to the che...

 javascript                     2 answers                     47 view

Page 1 of 145  |  Show More Pages:  Top Prev Next Last