infotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN A

infotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN A d vdsvegr yey erinfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN A gfgdfg dfg dfg dfg e4gerinfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN Ainfotogel.linkAUSASN Aus naUSN A

Reference section

I am citing a government organization in a research paper because they created a program which was used in the research. But, the program was created by an organization who since the creation of the program had changed their name. I don’t think I can list both in my reference since they are the same agency but it’s important to write the citation as being created by the organization under the first title. Old Title- The Environmental Agency of Japan. New Title- Ministry of the Environment of Japan. Maybe, every time I use the old title I write in parenthesis next to it (Currently known as the Ministry of the Environment of Japan)?

Converting Poly values from Shape file into Longitude and latitude

This is my first post so may be a work in progress. I am working with a shape map file which can be found here. I have am doing some data visualisation and want to see if certain longitude and latitudes are within a certain polygon in the shapemap.

This is the code I am using to check if a latitude and longitude is in a polygone. This works as I do it for other data

//imports
import geopandas as gpd
import shapely
from shapely.geometry import Point
from shapely.geometry import shape 
from shapely.geometry import Polygon
from descartes import PolygonPatch

//load in shapemap
soa_shape_map_path = './input/SOA2011_Esri_Shapefile_0/SOA2011.shp
soa_shape_map = gpd.read_file(soa_shape_map_path)
soa_geo_df=soa_shape_map['geometry']
soa_labels=soa_shape_map['SOA_LABEL']
reset_index(soa_geo_df)
reset_index(soa_labels)
soa_polys=soa_geo_df.values.T.tolist()

Then run through a set of longitude and latitudes in a dataframe to get what area it is part of

def check_df(df, polys, areas):
    # df contains crime data
    # polys contains all the paths dataframes containing the polygons
    # create a Polygon object from each of the dataframes

    for index, row in df.iterrows():
        lat = row["Latitude"]
        lng = row["Longitude"]
        point = Point((lng, lat))


    for row_idx, poly in enumerate(polys):
        if point.within(poly):
            df.at[index, "Areas"] = areas[row_idx]
            print("ADDED")            

return df

This never works because my longitude and latitude for df is always between 53/55 as it is Northern Ireland. When I check what the x and y co-ordinates are for soa_shape_map_path I get this

enter image description here

As you can tell, 54 is not even close to this number.

For my other shape map set I get this picture
enter image description here

There definitely is a way to get the values as when I open the program, add the shp file in a layer and add an open street map it gives this

enter image description here

I have watched a couple youtube videos and posts already but can not get what I need
https://www.youtube.com/watch?v=XI1qwzWPN1E

http://help.fulcrumapp.com/misc/guides-leveraging-external-tools/adding-latitude-and-longitude-data-to-shapefiles

Thanks for any help in advance

Martin

Shapekey paths crash (Kinda solved?)

EDIT: Kinda solved?

I think I fixed the issue. Literally, I just took all of the paths, converted them to mesh and back with Alt-C, then reapplied my hairiness to them.

Here’s the fixed result.

http://pasteall.org/blend/index.php?id=50715

I’m keeping the original up in case it was a bug, or in case I was a moron somewhere and need to be called out. 😛


I posted this issue on stack exchange a little while back. I don’t know if its my computer, my install, or what.

I’m having an issue where if a bunch of paths in a row are assigned a shape key, blender 2.79b will crash. Sometimes strands will just explode, as seen in the file as it opens; that’s all (meant to be) hair.

“Stable Enough” at rest
https://i.stack.imgur.com/5DfrC.png

Explosion https://i.stack.imgur.com/CbqTc.png

I’m using the paths-as-hair technique outlined in the recent video seen here: https://www.youtube.com/watch?v=t2XjdzzWCqI

I have saved the hair prop in its own file here http://pasteall.org/blend/index.php?id=50703

I made this file ready to go for a shape key, but it just wanted to do its own thing and explode instead. Rotate the selected vertex on Y (for a wind effect) and than tab out. Sometimes It crashes for me, and other times it explodes further, only to crash when I alt-c it down.

There are no modifiers or physics whatsoever.

The 2.8 build that I tried hated it too.

There was no difference when rotation/scale was applied.

This happened regardless of the complexity of the bevel object.

The paths are low res.

I don’t have very many paths at all. Less than the Youtube video above, albeit they are longer.

The rest of the scene interacting with the hair made no difference – in fact, it got worse when I both isolated it and cleared out the orphan blocks!

I have a backup, so nothing is lost.

Tolerating SQL errors (orderby not in distinct, select not in group by) in MySQL 5.7.13 vs 5.7.11

This question is related to the following 2 SQL errors (line breaks added by me)

MySql.Data.MySqlClient.MySqlException (0x80004005):
Expression #2 of ORDER BY clause is not in SELECT list, references column 'auitool2014.a.prog' which is not in SELECT list;
this is incompatible with DISTINCT


MySql.Data.MySqlClient.MySqlException (0x80004005): 
Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'H.C51' which is not functionally dependent on columns in GROUP BY clause; 
this is incompatible with sql_mode=only_full_group_by

My problem is simple to describe, even without posting the original SQL. I have a Mysql 5.7.11-log server running on Windows in which I can SELECT A,B GROUP BY A and SELECT DISTINCT A,B ORDER BY C without any problem. Yes, this is wrong from the SQL point of view.

But it works and customers are happy. It will never be fixed be fixed in the future.

We just installed a fresh standard Mysql 5.7.13-log on Linux using Yum. Now all queries containing such errors break.

I have looked around and it seems that Mysql team did some work about improper GROUP BYs. I have tried to disable full group bys but then I am left with the distinct issue.

I have also tried to replicate part of the Mysql configuration from the Windows box but returned again to both issues.

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

I just want to know how do I tell the new Mysql 5.7.13 to behave exactly like the (bugged?) version 5.7.11. We will try to install the exact 5.7.11 from Yum but it could take a considerable while. So to be more clear: how do I get rid of those two errors, humbly given that the SQL statements need to be eventually fixed?

Determine if two strings with unrecognized letters are from the same text

Given two strings S and T of N=>1 and M=>1 characters, respectively, with unrecognized letters (an unrecognized letter is marked by “?”, for brevity, every group of K consecutive “?” characters is replaced by the decimal representation of integer K (without single zero or leading zeros)), you need to know if these two strings can be from the same text.

Example 1: S = “A2Le” , T= “2pL1” could have been obtained as scans of the word “AppLe”.
Example 2: S = “ba1” , T= “1Ad” could not have been obtained from the same text, as the second letter of each text is different.

Write a function public boolean Solution(String S, String T); that given two strings determines whether strings S and T can be obtained from the same text.

My solution is as follow and I would like to know if it can be improved or done in a better way.

public boolean isSameText(String s, String t) {
    // count length by adding the sum of digits and the sum of letters
    int LS = countLength(s);
    int LT = countLength(t);
    // check if the two strings have not the same length
    if (LT != LS)
        return false;
    // determine each identified letter position in String s
    Map mapLettersS = findLettersPos(s);
    // determine each identified letter position in String t
    Map mapLettersT = findLettersPos(t);
    boolean result = true;
    //check if recognized letters are positioned the in the same place in
    // both Strings
    if (!checkSamePos(mapLettersS, mapLettersT))
        return false;
    result = checkSamePos(mapLettersT, mapLettersS);
    return result;
}

public int countLength(String s) {

    int sumDigits = 0;
    int sumLetter = 0;
    char[] charArray = s.toCharArray();
    for (int i = 0; i < charArray.length; i++) {
        if (Character.isLetter(charArray[i]))
            sumLetter++;
        else
            sumDigits = sumDigits + Character.getNumericValue(charArray[i]);
    }
    return sumDigits + sumLetter - 1;
}

public Map findLettersPos(String s) {
    Map mapLettersPos = new HashMap();
    // difference between chars position with consideration of numeric
    // number
    int diff = 0;
    for (int i = 0; i < s.length(); i++) {

        // here have to check if there is a digit before
        if (Character.isLetter(s.charAt(i)))
            if (diff > 0)
                mapLettersPos.put(i + diff - 1, s.charAt(i));
            else
                mapLettersPos.put(i, s.charAt(i));
        else {
            diff += Character.getNumericValue(s.charAt(i));

            int j = i + Character.getNumericValue(s.charAt(i));
            if(i+1 < s.length())
            mapLettersPos.put(j, s.charAt(i + 1));
            i = i + 1;
        }
    }
    return mapLettersPos;
}

public boolean checkSamePos(Map map1, Map map2) {
    for (int i = 0; i < map1.keySet().size(); i++) { // use iterator instead
                                                        // of for
        if (map1.containsKey(i) && map2.containsKey(i)) {
            if (map1.get(i).equals(map2.get(i)))
                continue;
            return false;
        }
    }
    return true;
}

How to send an email to an Organic Group admin for every comment of their group?

Drupal 7.x
Organic Groups / Rules 7.x-2.9

What is the best method to send an email to the ‘Administrator Member’ role of a group every time a comment is posted in their group?

I am looking to specify the exact groups that this rule works for.

Ideas for Medieval Infrastructure Project and the Geography that would demand it

I’ve always liked the ways that geography and transportation shape the locations of cities. I’d like ideas for geographic barriers that could be overcome by an infrastructure project that would make a secluded spot in the mountains suddenly become a major trade hub. The infrastructure project should be ambitious but feasible with Medieval technology.

One idea I was thinking was a project to render a Mountain Pass that had previously been impassable in the winter usable year round. What would be involved in such a project for people without explosives or power equipment?

Another thought was a canal. What geography would result in a relatively short canal in the wilderness having a huge impact?

Ideally I’d want a configuration of geography that would create opportunities for a lockless canal and a “Mountain Pass Improvement” project near each other in the same wilderness.

I’m visualizing a scenario where an ambitious King has to build a temporary village/work camp to complete a project in an isolated and nearly uninhabitable area, and suddenly a booming cities springs up when the project is complete. This is a scenario that happened a lot later in history when railroads were built but I’m trying to think up scenario where this would happen in a less technologically advanced world.

I realize long canals and mountain terracing existed in the Medieval world but I’m thinking of a project with a quicker payoff.

Turn infrared LED on and off in order to simulate an infrared signal

Note I am able to send and recieve IR signals. This question is only for purposes of learning.

When using the existing library #include it is very simple to read and transmit infrared signals. However I will like to send the signals myself with digitalWrite(pin, HIGH);

1) Receive an infrared signal from a remote control in order to clone it and send it later with Arduino.

For this to work I have purchased an infrared LED.

I connect the left leg of the IR LED to pin 11, the middle leg to the ground and the right leg to 5 volts.

Then I upload the following sketch to arduino:

#include 

int receiverpin = 11; // left leg of IR receiver is connected to this pin

IRrecv irrecv(receiverpin);
decode_results results;


void setup() {
  pinMode(receiverpin, INPUT);
  Serial.begin(9600);
  irrecv.enableIRIn();
}

void loop() {
  if (irrecv.decode(&results))
  {
    Serial.println(results.value, HEX);
    irrecv.resume();
    delay(150);
  }
}

When I run that and press the power button of my samsung remote control this is what I capture through serial:

Encoding  : SAMSUNG
Code      : E0E040BF (32 bits)
Timing[67]: 
 +4500, -4500     + 550, -1650     + 550, -1700     + 550, -1700
 + 550, - 600     + 500, - 550     + 550, - 550     + 550, - 600
 + 550, - 550     + 550, -1700     + 550, -1650     + 550, -1700
 + 550, - 550     + 550, - 550     + 550, - 600     + 550, - 550
 + 550, - 550     + 550, - 600     + 550, -1650     + 550, - 600
 + 550, - 550     + 550, - 550     + 550, - 550     + 550, - 600
 + 550, - 550     + 550, -1700     + 550, - 550     + 550, -1700
 + 500, -1700     + 550, -1700     + 550, -1650     + 550, -1750
 + 500, -1650     + 550
unsigned int  rawData[67] = {4500,4500, 550,1650, 550,1700, 550,1700, 550,600, 500,550, 550,550, 550,600, 550,550, 550,1700, 550,1650, 550,1700, 550,550, 550,550, 550,600, 550,550, 550,550, 550,600, 550,1650, 550,600, 550,550, 550,550, 550,550, 550,600, 550,550, 550,1700, 550,550, 550,1700, 500,1700, 550,1700, 550,1650, 550,1750, 500,1650, 550};  // SAMSUNG E0E040BF
unsigned int  data = 0xE0E040BF;

What is this supposed to mean. How can I conver this to 0s and 1s?

2) Sending cloned signal from arduino.

Now if I want to power on my TV with arduino I will need a Infrared LED. I will connect pin 3 to the long leg of my LED and ground to the short leg. Once I pefrom that connection I will run this sketch:

#include 

void setup() {}

void loop() {

  irsend.sendSAMSUNG(0xE0E040BF, 32); //Power Code
  delay(1000); // try again in 1 second

}

3) Now my question

It was very simple to read and transmit infrared signals using IRremote.h header.The only thing I had to do was capture 0xE0E040BF that I got when reading the infrared signal and use that hex code on part 2. From reading on the internet I have researched that sending an IR signal is just turning and IR LED on and off very fast (38khz). How can I tranlate what I read:

 rawData[67] = {4500,4500, 550,1650, 550,1700, 550,1700, 550,600, 500,550, 550,550, 550,600, 550,550, 550,1700, 550,1650, 550,1700, 550,550, 550,550, 550,600, 550,550, 550,550, 550,600, 550,1650, 550,600, 550,550, 550,550, 550,550, 550,600, 550,550, 550,1700, 550,550, 550,1700, 500,1700, 550,1700, 550,1650, 550,1750, 500,1650, 550}; 

To 0s and 1s and then send that hard coded for puposes of learning.

Acording to this link: http://www.remotecentral.com/cgi-bin/codes/samsung/tv_functions/

The infrared code to power on a samsung tv is:

0000 006d 0022 0003 00a9 00a8 0015 003f 0015 003f 0015 003f 0015 0015 0015 
0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0015 
0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 0015 0015 
0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0015 0015 003f 
0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 0702 00a9 00a8 0015 
0015 0015 0e6e

I have converted that to binary and it comes to be:

000000000000000000000000011011010000000000100010000000000000001100000000101010010000000010101000000000000001010100000000001111110000000000010101000000000011111100000000000101010000000000111111000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000111111000000000001010100000000001111110000000000010101000000000011111100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000111111000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000010000000000000000010101000000000001010100000000000101010000000000111111000000000001010100000000001111110000000000010101000000000011111100000000000101010000000000111111000000000001010100000000001111110000000000010101000000000011111100000000000101010000011100000010000000001010100100000000101010000000000000010101000000000001010100000000000101010000111001101110

Now every time I see a 0 I will power off the LED and every time I see a 1 I will power on the LED waiting about 10 microseconds in order to have a frequency of 38khz This is how my sketch looks like:

int pinSend=3;
char data[1248] = "000000000000000000000000011011010000000000100010000000000000001100000000101010010000000010101000000000000001010100000000001111110000000000010101000000000011111100000000000101010000000000111111000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000111111000000000001010100000000001111110000000000010101000000000011111100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000111111000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000000101010000000000010101000000000001010100000000010000000000000000010101000000000001010100000000000101010000000000111111000000000001010100000000001111110000000000010101000000000011111100000000000101010000000000111111000000000001010100000000001111110000000000010101000000000011111100000000000101010000011100000010000000001010100100000000101010000000000000010101000000000001010100000000000101010000111001101110"; 
int waitTimeInMicroseconds = 5; // counter to try with different wait times in order to see what frequency works best

void setup() {
  Serial.begin(9600);
  pinMode(pinSend,OUTPUT);
}

void loop() {

  Serial.print("Starting sending IR signal waiting ");
  Serial.print(counter);
  Serial.println(" microseconds");


  int len = sizeof(data);

  for(int i=0; i

When I run that code the TV does not turn on why? How can I hard code the 0s and 1s for purposes of learning?